developer tip

권한 거부 됨-/Library/Caches/Homebrew/Formula/nmap.brewing

copycodes 2020. 11. 29. 11:52
반응형

권한 거부 됨-/Library/Caches/Homebrew/Formula/nmap.brewing


macbook pro (OSX 10.8.4)에서 새 사용자 '아빠'를 만들었습니다. '아빠'는 관리자입니다. 홈브류를 '아빠'로 성공적으로 설치했습니다. 다른 사용자가 이전에 설치했습니다. 나는했다 :

sudo chown -R dad /usr/local/
cd /usr/local/
chmod -R 777 *

그러나 다음과 같은 설치 시도 :

brew install nmap

제공 :

Error: Permission denied - /Library/Caches/Homebrew/Formula/nmap.brewing

nmap.brewing이 존재하지 않는 것 같습니다.

dad$ ls -l /usr/local/Library/Caches/Homebrew/Formula/nmap.brewing
ls: /usr/local/Library/Caches/Homebrew/Formula/nmap.brewing: No such file or directory

dad$ ls -l /Library/Caches/Homebrew/Formula/nmap.brewing
ls: /Library/Caches/Homebrew/Formula/nmap.brewing: No such file or directory

어떤 아이디어?


결정된.

/ Library / Caches / Homebrew의 소유권을 가져야하는 것 같았습니다.

sudo chown -R $USER /Library/Caches/Homebrew/

brew 맨 페이지검색하면 /Library/Caches/Homebrewhomebrew가 캐싱에 사용하는 디렉토리를 HOMEBREW_CACHE환경 변수로 설정하거나 ~/Library/Caches/Homebrew. 이러한 접근 방식은 chown관리자가 아닌 경우 접근 방식 보다 쉽습니다 .


아래 명령을 사용했습니다.

sudo chmod -R g + w / Library / Caches / Homebrew / Formula /

sudo chgrp -R 직원 / Library / Caches / Homebrew / Formula /


mkdir -p ~ / Library / Caches / Homebrew echo 'export HOMEBREW_CACHE = ~ / Library / Caches / Homebrew'>> ~ / .bash_profile 소스 ~ / .bash_profile


사용자에게 권한이 없으므로 명령을 사용하십시오.

sudo chown -R $(whoami) /usr/local/var/homebrew

참고 URL : https://stackoverflow.com/questions/17610417/permission-denied-library-caches-homebrew-formula-nmap-brewing

반응형