Laravel Composer需要Mac Sierra的问题

时间:2017-07-08 20:41:34

标签: php macos laravel openssl composer-php

我试图在我的申请中加入Laravel 5 Facade for Goutte。但是我收到以下错误:

 Problem 1
- namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- Installation request for namshi/jose (locked at 5.0.2) -> satisfiable by namshi/jose[5.0.2].

我已在网上搜索,它建议安装新版本的PHP并尝试使用它,但我已经通过自制软件安装了php56,但它仍然无法正常工作。我跑的时候:

which php

它说路径是:

/usr/bin/php

然而brew将PHP安装到:

/usr/local/Cellar/php56/5.6.30_6/bin

我已使用以下行更新了我的.bash_profile:

export PATH=$PATH:/usr/local/Cellar/php56/5.6.30_6/bin

然而即使重启了php仍然返回的终端/ usr / bin / php。

1 个答案:

答案 0 :(得分:1)

您可以尝试以这种方式为新的php版本创建符号链接:

sudo ln /usr/local/Cellar/php56/5.6.30_6/bin/php /usr/local/bin/php

然后运行你的作曲家命令

php composer require weidner/goutte

php composer.phar require weidner/goutte

希望这有帮助!