我有一台2016 MacBook Pro(带触摸屏)和Mac OS Sierra(10.12.3)。我刚刚安装了Homebrew(v1.1.9)并运行brew install gcc49
。它似乎安装所有依赖项,但一旦它到达gcc,我得到
Error: Permission denied - /Users/<me>/Library/Caches/Homebrew/gcc@4.9-4.9.3.tar.bz2
Homebrew下载后的原始权限:
-rw-r--r-- 1 <me> <company_domain> 86M Jun 26 2015 /Users/<me>/Library/Caches/Homebrew/gcc@4.9-4.9.3.tar.bz2
我尝试设置为755
并分组到admin
,但没有运气:
-rwxr-xr-x 1 <me> admin 86M Jun 26 2015 /Users/<me>/Library/Caches/Homebrew/gcc@4.9-4.9.3.tar.bz2
> brew install gcc49
Updating Homebrew...
==> Using the sandbox
==> Downloading https://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
Already downloaded: /Users/<me>/Library/Caches/Homebrew/gcc@4.9-4.9.3.tar.bz2
Error: Permission denied - /Users/<me>/Library/Caches/Homebrew/gcc@4.9-4.9.3.tar.bz2
然后chown
将目录编辑为组admin
而不是公司域。它已拥有775
权限。仍然没有运气。
我看过几个帖子,人们不得不chown
目录让自制软件满意,但我没有看到给定文件或目录的权限问题。
brew doctor
报告了一些意外的dylib,标头和.pc
文件。我不确定这些是否来自我公司的Mac OS映像。
我忽略了一些明显的东西吗?我感谢任何帮助。
以下是整个初始安装输出:
> brew install gcc49
==> Installing dependencies for gcc@4.9: gmp@4, mpfr@2, libmpc@0.8, isl@0.12, cloog
==> Installing gcc@4.9 dependency: gmp@4
==> Downloading https://homebrew.bintray.com/bottles/gmp@4-4.3.2.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring gmp@4-4.3.2.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/gmp@4/lib
CPPFLAGS: -I/usr/local/opt/gmp@4/include
==> Summary
/usr/local/Cellar/gmp@4/4.3.2: 20 files, 2.4M
==> Installing gcc@4.9 dependency: mpfr@2
==> Downloading https://homebrew.bintray.com/bottles/mpfr@2-2.4.2.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring mpfr@2-2.4.2.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/mpfr@2/lib
CPPFLAGS: -I/usr/local/opt/mpfr@2/include
==> Summary
/usr/local/Cellar/mpfr@2/2.4.2: 25 files, 2.7M
==> Installing gcc@4.9 dependency: libmpc@0.8
==> Downloading https://homebrew.bintray.com/bottles/libmpc@0.8-0.8.1.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring libmpc@0.8-0.8.1.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/libmpc@0.8/lib
CPPFLAGS: -I/usr/local/opt/libmpc@0.8/include
==> Summary
/usr/local/Cellar/libmpc@0.8/0.8.1: 12 files, 273.8K
==> Installing gcc@4.9 dependency: isl@0.12
==> Downloading https://homebrew.bintray.com/bottles/isl@0.12-0.12.2.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring isl@0.12-0.12.2.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/isl@0.12/lib
CPPFLAGS: -I/usr/local/opt/isl@0.12/include
==> Summary
/usr/local/Cellar/isl@0.12/0.12.2: 57 files, 2.9M
==> Installing gcc@4.9 dependency: cloog
==> Downloading https://homebrew.bintray.com/bottles/cloog-0.18.4_1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring cloog-0.18.4_1.sierra.bottle.tar.gz
/usr/local/Cellar/cloog/0.18.4_1: 35 files, 442.4K
==> Installing gcc@4.9
==> Using the sandbox
==> Downloading https://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
==> Downloading from http://mirror.easthsia.com/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
######################################################################## 100.0%
Error: Permission denied - /Users/<me>/Library/Caches/Homebrew/gcc@4.9-4.9.3.tar.bz2
答案 0 :(得分:1)
尝试sudo chown -R <me>:admin /usr/local/*
然后重试。您可能需要递归地恢复某些用户或组所有权(此命令将执行此操作)。