목차
brew 설치
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
root@datapecker3:/home# sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
Warning: Linuxbrew has been merged into Homebrew.
Please migrate to the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Don't run this as root!
root 계정으로 설치 명령어를 실행하면 다음과 같은 결과가 나타난다.
이 때문에 계정을 사용자 계정으로 변경 후 설치하자!
su user
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
root@datapecker3:/home# su user
user@datapecker3:/home$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
Warning: Linuxbrew has been merged into Homebrew.
Please migrate to the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
==> Checking for `sudo` access (which may request your password)...
[sudo] password for user:
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
==> The following new directories will be created:
/home/linuxbrew/.linuxbrew/bin
/home/linuxbrew/.linuxbrew/etc
/home/linuxbrew/.linuxbrew/include
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/sbin
/home/linuxbrew/.linuxbrew/share
/home/linuxbrew/.linuxbrew/var
/home/linuxbrew/.linuxbrew/opt
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions
/home/linuxbrew/.linuxbrew/var/homebrew
/home/linuxbrew/.linuxbrew/var/homebrew/linked
/home/linuxbrew/.linuxbrew/Cellar
/home/linuxbrew/.linuxbrew/Caskroom
/home/linuxbrew/.linuxbrew/Frameworks
Press RETURN/ENTER to continue or any other key to abort:
// #Enter 를 누르자
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew doctor
user@datapecker3:/home$ echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.profile
user@datapecker3:/home$ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
user@datapecker3:/home$ brew doctor
Your system is ready to brew.
최신버전의 os에선 이렇게만 하면 설치가 완료된다. 하지만 centos 7과 같이 낮은 버전의 os에서는 git과 curl 버전을 yum 저장소에서 낮은 버전만 지원하기 때문에 최신버전으로 별도의 설치가 필요할 수 있다.
Error Case
1) Please update your system curl or set HOMEBREW_CURL_PATH to a newer version.
export HOMEBREW_CURL_PATH=/usr/local/bin/curl >> ~/.bashrc
HOMEBREW_CURL_PATH 환경 변수 설정을 하라는 에러이다.
2) Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
su user
root 계정이 아닌 사용 계정으로 로그인해서 사용하면 해결된다.
3) Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: No developer tools installed. Install Clang or run brew install gcc.
brew install gcc
Homebrew를 정상적으로 사용하기 위해서는 개발 도구(Developer Tools) 또는 컴파일러(GCC)가 필요하다. 이는 Homebrew에서 소프트웨어 패키지를 빌드하거나 설치할 때 필요한 의존성 때문이다.
위 명령어로 gcc를 설치해주면 된다.
'Infrastructure > Linux' 카테고리의 다른 글
[Linux] CentOS 7 - Git 설치 및 세팅 방법 (0) | 2024.02.17 |
---|---|
[NginX] 설치 방법 및 webpack cli dist파일 실행 (0) | 2023.09.07 |
jar 실행 시 nohup 종료되지 않고 프로세스 실행하는 법 (0) | 2023.03.24 |
Linux 외부 접근 IP 확인 명령어 (0) | 2023.03.20 |
리눅스 버전 확인 방법 (0) | 2023.03.20 |