brew链接php71:无法符号链接sbin/php-fpm [英] brew link php71: Could not symlink sbin/php-fpm

查看:218
本文介绍了brew链接php71:无法符号链接sbin/php-fpm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装Laravel Valet,它需要php 7.1,但是当我运行brew install php71时,出现以下错误:

I'm trying to install Laravel Valet, which requires php 7.1, but when i run brew install php71, I get the following error:

==> 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.

I get the same error when i run brew link php71. If i run php -v, I actually see that I'm currently running PHP 7.1.7.

但是当我运行代客安装时,我得到:

But when I run valet install, I get:

  [DomainException]
  Unable to determine linked PHP.

我什至在/usr/local中都没有sbin目录.

I don't even have an sbin directory in /usr/local.

有什么建议吗?

推荐答案

我通过首先创建目录sbin解决了此问题:

I solved this problem by first creating the directory sbin:

sudo mkdir /usr/local/sbin

然后,如果您像我一样使用macOS highSierra 10+,则需要运行:

then if you are like me using macOS highSierra 10+ you need to run:

sudo chown -R $(whoami) $(brew --prefix)/sbin

在此之后

brew link php

这篇关于brew链接php71:无法符号链接sbin/php-fpm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆