[Nginx] osx 에 nginx 설치 하기 - brew install
ITWeb/개발일반 2016. 11. 23. 10:02mac osx 에 설치 할 일이 있어서 작성해 봅니다.
$ sudo chown -R '사용자계정' /usr/local/lib/pkgconfig
$ brew install pcre
$ brew link --overwrite pcre
$ brew update
$ sudo chown -R '사용자계정' /usr/local
$ brew install nginx
$ sudo chown root:wheel /usr/local
'사용자계정' 에는 user account 넣어 주시면 됩니다.
예를 들어 henry 라는 계정을 사용하시면)
$ sudo chown -R henry /usr/local/lib/pkgconfig
저는 설치 하다 몇 가지 에러가 발생을 해서 위 순서대로 구성을 하였습니다.
아래는 발생한 에러 입니다.
Error case 1)
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/pkgconfig/libpcre.pc
/usr/local/lib/pkgconfig is not writable.
Error case 2)
mkdir: /usr/local/var/run: Permission denied
make[1]: *** [install] Error 1
make: *** [install] Error 2
READ THIS: https://git.io/brew-troubleshooting
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:353:in `open_http': 422 Unprocessable Entity (GitHub::Error)
Validation Failed
Error case 3)
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. For example, upgrading
to OS X El Capitan has been known to do this. Some versions of the
"InstantOn" component of Airfoil or running Cocktail cleanup/optimizations
are known to do this as well.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local