Page MenuHomePhabricator

Can not install Fresh 21.04.1 on Ubuntu 21.04
Closed, ResolvedPublic

Description

I'm trying to install Fresh on Ubuntu.

z@air:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 21.04
Release:	21.04
Codename:	hirsute

I'm getting this error message.

z@air:~$ bash -c 'curl -fsS https://gerrit.wikimedia.org/g/fresh/+/21.04.1/bin/fresh-node10?format=TEXT \
| base64 --decode > /usr/local/bin/fresh-node \
&& echo "d38c34d542dc685669485bbe04a9d1a926a224a4ba27a01d59ae563558d8e987  /usr/local/bin/fresh-node" | shasum -a 256 -c \
&& chmod +x /usr/local/bin/fresh-node \
&& echo -e "\n\xf0\x9f\x8c\xb1\x20Fresh\x20is\x20ready\x21\n"||(echo -e "\xe2\x9d\x8c";false)'

bash: line 2: /usr/local/bin/fresh-node: Permission denied
curl: (23) Failure writing output to destination
❌

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think this means user z doesn't have write permission for /usr/local/bin/ so we can't install it.

You could:

  • Use sudo bash … instead of bash …. Review the commands of the install snippet to decide whether you 're comfortable with this (all it should do is download a file and place it there. It will not run any other commands as root, and fresh-node itself will still not run as root, all okay!).
  • Or, check which user groups own /usr/local/bin/ and make sure your user is in a group that is permitted to install shell programs.
  • Or, run sudo chmod 775 /usr/local/bin/ once, after which any user account will be allowed to install shell scripts in this directory. This is how macOS is usually configured. Of course, only do this if you don't have other users on this machine, and/or if you're okay with other users being able to install scripts that affect user z.
zeljkofilipin claimed this task.

sudo worked fine, thanks!

Change 691271 had a related patch set uploaded (by Krinkle; author: Krinkle):

[fresh@master] docs: Document troubleshooting for /usr/local/bin/ permission error

https://gerrit.wikimedia.org/r/691271

Change 691271 merged by jenkins-bot:

[fresh@master] docs: Document troubleshooting for /usr/local/bin/ permission error

https://gerrit.wikimedia.org/r/691271

zeljkofilipin renamed this task from Can not install Fresh on Ubuntu to Can not install Fresh 21.04.1 on Ubuntu.Dec 8 2021, 1:25 PM
zeljkofilipin renamed this task from Can not install Fresh 21.04.1 on Ubuntu to Can not install Fresh 21.04.1 on Ubuntu 21.04.
hashar claimed this task.
hashar added subscribers: dcausse, hashar.

During a pairing with @zeljkofilipin , @dcausse has been hit by /usr/local/bin not being writable. We went to use sudo python3 which is not ideal. We can write to $HOME/.local/bin instead :]

Change 778253 had a related patch set uploaded (by Hashar; author: Hashar):

[fresh@master] fresh-install: on Linux use ~/.local/bin

https://gerrit.wikimedia.org/r/778253

Change 778590 had a related patch set uploaded (by Krinkle; author: Krinkle):

[fresh@master] test: Add coverage for fresh-install

https://gerrit.wikimedia.org/r/778590

Change 778253 merged by jenkins-bot:

[fresh@master] fresh-install: Support installing to ~/.local/bin for Linux

https://gerrit.wikimedia.org/r/778253

Change 778590 merged by jenkins-bot:

[fresh@master] test: Add coverage for fresh-install

https://gerrit.wikimedia.org/r/778590

All related commits are merged, can this be resolved?

Krinkle moved this task from Support & Meta to Enhancement on the Fresh board.