7
submitted 2 months ago* (last edited 2 months ago) by Lost_My_Mind@lemmy.world to c/linux4noobs@programming.dev

So I tried to install a fan script last night. It's supposed to be a 1 line of code.

But even though it's a brand new installation of ubuntu, my system says "No. You need to install curl first"

When I try to do that, my system says "no, you already have a more recent version of curl installed"

I'd love to copy/paste the exact text, so you guys could see what I see, but when I do that, either in comments or in new posts, Lemmy gets confused, and won't post it.

How do I get you guys a copy/paste of this, so you guys can say "Oh, you have to do this this and this"?


Ok, this is becoming what I remember not liking of not understanding linux.

I was supposed to just type one line of code

... curl https://download.argon40.com/argon1.sh | bash ...

And that led to me not having curl installed. After 24 hours of trying to figure this out, I finally figured out I need to type

... sudo snap install curl # version 8.1.2 ...

And so then I type

... curl https://download.argon40.com/argon1.sh | bash ...

again, and this time I get this.

... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 19245 100 19245 ************* 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 4848 Argon Setup
0 0 --:--************* :-- --:--:-- --:--:-- 48598 E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 6408 (unattended-upgr) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?


Please also connect device to the internet and restart installation.


bighat@bighat-desktop:~$ ...

I have no idea what that lock is, or what to do. I was told "oh, it'll be easy, you just gotta put in this one line of code". Going on 4 years trying to get that fan to work...

you are viewing a single comment's thread
view the rest of the comments
[-] remotelove@lemmy.ca 2 points 2 months ago* (last edited 2 months ago)

The script is complaining that it can't find curl? What is this script that you are using? It's probably got a super-basic check for curl (in the wrong location) that can be modified. (Type in the source URL for it here, or something.)

However, running any script without fully understanding it is not advisable to begin with.

Typing in 'which curl' at the command line should give you the proper location of the existing binary of curl.

[-] Lost_My_Mind@lemmy.world 1 points 2 months ago* (last edited 2 months ago)

Typed which curl, and it just went to the next line.

The script location is https://download.argon40.com/argon1.sh

[-] remotelove@lemmy.ca 4 points 2 months ago

There are about a million different flavors of how to download and execute a shell script. Regardless, you need to redirect the output of curl into bash with the -s flag. Bash needs to know that it is reading from STDIN.

Here is an over-thought stackoverflow page on it: https://stackoverflow.com/questions/5735666/execute-bash-script-from-url

Also, if the script is not being read properly, that might explain the dpkg lock issue. Running two instances of dpkg simultaneously is likely causing that collision you are seeing. (If one instance is running, it will touch a lock file and then delete it when it stops. It prevents "bad things" from happening when two instances of the same app want the same resources.)

That is odd if your path is broken. It curl should be in /usr/bin and 'which' should find it. Are you somehow launching another shell inside a shell? Like zsh inside of bash, or something in that flavor? (In some rare cases, that would break paths and profile configs for your active shell.)

Regardless of why curl isn't being found, or only partially found, or something, learn "env". You need to get a decent picture of what your working environment is and why something as basic as curl "isn't found". ('which' is about as a baseline of a command as there is.)

this post was submitted on 18 Sep 2024
7 points (88.9% liked)

linux4noobs

1356 readers
1 users here now

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?

Community Rules

founded 1 year ago
MODERATORS