我拥有 rwx 权限的文件的 Homebrew 权限被拒绝
Homebrew permission denied on file I own with rwx permissions
我有一个 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
报告了一些意外的动态库、头文件和 .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
尝试 sudo chown -R <me>:admin /usr/local/*
然后重试。您可能需要递归地恢复某些用户或组的所有权(此命令将执行此操作)。
我有一个 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
报告了一些意外的动态库、头文件和 .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
尝试 sudo chown -R <me>:admin /usr/local/*
然后重试。您可能需要递归地恢复某些用户或组的所有权(此命令将执行此操作)。