我正在尝试安装 Laravel Valet,它需要 php 7.1,但是当我运行brew install php71 时,出现以下错误:
==> Pouring php71-7.1.10_21.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink sbin/php-fpm
/usr/local/sbin is not writable.
当我运行 brew link php71
时,我遇到了同样的错误。如果我运行 php -v
,我实际上看到我当前正在运行 PHP 7.1.7。
但是当我运行 valet install 时,我得到:
[DomainException]
Unable to determine linked PHP.
我什至在/usr/local 中没有 sbin 目录。
有什么建议吗?
最佳答案
我通过首先创建目录sbin
解决了这个问题:
sudo mkdir /usr/local/sbin
如果你像我一样使用 macOS highSierra 10+,你需要运行:
sudo chown -R $(whoami) $(brew --prefix)/sbin
在此之后
brew link php
关于php - brew 链接 php71 : Could not symlink sbin/php-fpm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46778133/