본문 바로가기
Errors

[Error] brew설치 중 sudo 암호가 입력 안되는 경우

by ds31x 2023. 9. 13.

정상적인 암호를 넣어도 진행이 안되는 경우가 있다.
주로 aws의 lightsail의 ubuntu에서 발생한다.
의심이 가는 건 private key를 통한 ssh로 최초 접속이라는 점이 문제의 원인이 되는 거 같은데...

passwd로 실제 암호를 기재를 해준 상태이기 때문 해당 이유를 사실 잘 모르겠다.

일단 다음과 같이 3번 sudo 암호를 물어보고 더이상 설치가 진행되지 않는다.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
>
> "
==> Checking for `sudo` access (which may request your password)...
[sudo] password for ubuntu:
Sorry, try again.
[sudo] password for ubuntu:
Sorry, try again.
[sudo] password for ubuntu:
sudo: 3 incorrect password attempts
Insufficient permissions to install Homebrew to \"/home/linuxbrew/.linuxbrew\" (the default prefix).

Alternative (unsupported) installation methods are available at:
https://docs.brew.sh/Installation#alternative-installs

Please note this will require most formula to build from source, a buggy, slow and energy-inefficient experience.
We will close any issues without response for these unsupported configurations.

일단 이 문제를 우회하려면 다음과 같은 환경변수를 설정하고 설치 shell파일을 수행하면 된다.
(설치중 interaction을 하지않는 설정임.)

export NONINTERACTIVE=1
728x90