由于文件权限问题,无法构建Homebrew包

问题描述 投票:0回答:1

我想向Homebrew #20409提交PR,它应该将libp11从版本0.2.8更新到0.4.7但是我在本地运行安装时遇到一些问题。

我正在拉我的补丁20409并进行交互式安装。

brew pull https://github.com/Homebrew/homebrew-core/pull/20409
brew install --interactive libp11

./configure
make
make install

make install抱怨无法创建常规文件...操作不允许似乎需要sudo权限,但我不确定它是否正确的方法。

make install     
Making install in src
 /usr/local/bin/gmkdir -p '/usr/local/Cellar/openssl/1.0.2m/lib/engines'
 /usr/local/bin/gmkdir -p '/usr/local/lib'
 /usr/local/bin/gmkdir -p '/usr/local/include'
 /bin/sh ../libtool   --mode=install /usr/local/bin/ginstall -c   libp11.la '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/local/bin/ginstall -c   pkcs11.la '/usr/local/Cellar/openssl/1.0.2m/lib/engines'
 /usr/local/bin/gmkdir -p '/usr/local/lib/pkgconfig'
 /usr/local/bin/ginstall -c -m 644 libp11.h p11_err.h '/usr/local/include'
 /usr/local/bin/ginstall -c -m 644 libp11.pc '/usr/local/lib/pkgconfig'
ginstall: cannot create regular file '/usr/local/include/libp11.h': Operation not permitted
ginstall: cannot create regular file '/usr/local/include/p11_err.h': Operation not permitted
make[2]: *** [install-includeHEADERS] Error 1
make[2]: *** Waiting for unfinished jobs....
ginstall: cannot create regular file '/usr/local/lib/pkgconfig/libp11.pc': Operation not permitted
make[2]: *** [install-pkgconfigDATA] Error 1
libtool: install: /usr/local/bin/ginstall -c .libs/libp11.2.dylib /usr/local/lib/libp11.2.dylib
libtool: install: /usr/local/bin/ginstall -c .libs/pkcs11.dylib /usr/local/Cellar/openssl/1.0.2m/lib/engines/pkcs11.dylib
ginstall: cannot create regular file '/usr/local/lib/libp11.2.dylib': Operation not permitted
ginstall: cannot create regular file '/usr/local/Cellar/openssl/1.0.2m/lib/engines/pkcs11.dylib': Operation not permitted
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: *** [install-enginesexecLTLIBRARIES] Error 1
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

通常我会打电话给sudo make install然而这是不允许operation not permitted: sudo与Homebrew。

我在MAC OS Sierra而不是High Sierra上运行测试,所以qazxsw poi问题不适用

makefile homebrew
1个回答
0
投票

我知道你说你正在运行Sierra,但这仍然只是一个文件权限问题。对于Sierra,您应该能够这样做:

this

你链接的另一篇文章说sudo chown -R $(whoami) $(brew --prefix) 不能被称为(很高兴知道,我会很快打到.....)所以“修复”只是对/usr/local那里的一切:

chown

如果已经创建了您需要写入的目录,那么这将正常工作。

热门问题
推荐问题
最新问题