install: Install script fails on ubuntu 20.04 on AWS
I deployed an Ubuntu 20.04 instance on AWS; these instances has one sudoer user called ubuntu and it has no password.
I tried to running
ubuntu@ip-172-31-17-172:~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
==> Select the Homebrew installation directory
- Enter your password to install to /home/linuxbrew/.linuxbrew (recommended)
- Press Control-D to install to /home/ubuntu/.linuxbrew
- Press Control-C to cancel installation
[sudo] password for ubuntu:
Sorry, try again.
As the user does not have any password, I was unable to install to /home/linuxbrew/.linuxbrew. Installing to /home/ubuntu/ succeeds but as you guys know there are many other issues with installing into this location.
The last commit that is working in is 08ee636817bb5113de259ce2d72e2628a8e8909b.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 22 (8 by maintainers)
Apologies for joining late, but I think the installer should work fine if you add
CI=1in front of/bin/bash $(.... For example, I launched a new Docker container for Ubuntu 20.04, installed all the required packages as in our Dockerfile – https://github.com/Homebrew/brew/blob/master/Dockerfile – but createdubuntuuser instead oflinuxbrew. The final command (CI=1 /bin/bash ...) installed Homebrew in/home/linuxbrew/.linuxbrew:log
This has been open for quite some time now and some of the discussion seems to be a little misguided. One of the main problems seems to be the entanglement of the
NONINTERACTIVEflag with installation in~/.linuxbrewvs./home/linuxbrew/.linuxbrew. The other problem is thatsudomakes it kind of hard to detect password-lesssudofunctionality. I see 3 main, non-exclusive parts to solving that:Defaults verifypw = anyto sudoers file)sudoand request an amendedsudo -v<CTRL-D>at the sudo prompt, ask if they really meantCI=1We allow it through an alternative installation mechanism: https://docs.brew.sh/Installation#untar-anywhere
We don’t want to make it easy for users to do “the wrong thing” here.
No, sorry.
@maxim-belkin Awesome! That does appear to fix the issue with installing Homebrew on Chromebooks! Thanks so much for the tip!