当我运行brew链接php
Linking /usr/local/Cellar/php/7.2.5...
Error: Could not symlink include/php
/usr/local/include is not writable.
我试试
MacBook-Pro:local Fatm$ sudo chown -R $(whoami) /usr/local
chown: /usr/local: Operation not permitted
我找不到包含
MacBook-Pro:local Fatm$ ls -a
.github CODEOFCONDUCT.md Homebrew bin
remotedesktop .gitignore Caskroom LICENSE.txt
etc sbin .com.apple.installer.keep .travis.yml
Cellar Library lib share
.git .yardopts Frameworks README.md
opt var
MacBook-Pro:local Fatm$ sudo chown -R $(whoami) /usr/local/include
Password:
chown: /usr/local/include: No such file or directory
我如何解决问题
答案 0 :(得分:6)
homebrew / usr / local在高sierra中不可写(如果 include 文件夹不存在)。继续创建它,然后将其权限更改为自己。
cd /usr/local
sudo mkdir include
sudo chown -R $(whoami) $(brew --prefix)/include
之后尝试使用brew命令