Brew 공식을 올바르게 설치할 수 없습니다(/usr/local/lib에서 권한이 거부됨)

Brew 공식을 올바르게 설치할 수 없습니다(/usr/local/lib에서 권한이 거부됨)

새로운 Mac에 몇 가지 Homebrew 패키지를 설치하고 있습니다. 그러나 연결하는 동안 몇 가지 오류가 있습니다.

ln: ./libsvn_wc-1.dylib: Permission denied
Error: The linking step did not complete successfully
The package built, but is not symlinked into /usr/local
You can try again using `brew link subversion'
Error: Could not create symlink /usr/local/lib/libsvn_wc-1.dylib.
Check that you have permssions on /usr/local/lib
==> Summary
/usr/local/Cellar/subversion/1.6.15: 88 files, 6.0M, built in 38 seconds

따라서 여기서 볼 수 있듯이 SVN은 실제로 올바르게 설치되지 않았습니다.

charon:~ werner$ which svn
/usr/bin/svn

Git의 경우에도 동일한 오류가 발생합니다.

charon:~ werner$ brew link git
Error: Permission denied - /usr/local/lib/python2.6

그러나 이것은 올바르게 설치되었습니다.

charon:~ werner$ which git
/usr/local/bin/git

chmod디렉토리 만 작성해야 합니까 lib, 아니면 더 선호하는 다른 작업이 있습니까?

charon:~ werner$ ls -l /usr/local/
total 8
drwxr-xr-x   7 werner  staff   238 Mar  8 15:58 Cellar
drwxr-xr-x   6 werner  staff   204 Mar  8 14:21 Library
-rw-r--r--   1 werner  staff  1614 Mar  8 14:21 README.md
drwxr-xr-x  56 werner  staff  1904 Mar  8 15:59 bin
drwxr-xr-x   4 werner  staff   136 Mar  8 15:46 etc
drwxr-xr-x   3 werner  staff   102 Mar  8 15:59 include
drwxr-xr-x   3 root    wheel   102 Apr 17  2010 lib
drwxr-xr-x  12 werner  staff   408 Mar  8 15:57 share
drwxr-xr-x   4 root    wheel   136 Mar  8 14:43 texlive

답변1

글을 쓰는 시점에서 Homebrew에서는 /usr/local의 내용을 사용자 이름으로 표시해야 합니다. 이것은 훌륭한 솔루션처럼 보이지는 않지만 작동하며 확실히 권장되는 용도입니다. 보다:https://github.com/mxcl/homebrew/issues/9953#issuecomment-3800557

넌 할 수있어:

sudo chown -R `whoami` /usr/local

관련 정보