【问题标题】:Laravel Composer require issue with Mac SierraLaravel Composer 需要 Mac Sierra 的问题
【发布时间】:2017-07-08 20:41:33
【问题描述】:

我正在尝试在我的应用程序中包含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。

【问题讨论】:

  • 您是否尝试为您的 php 启用 lib-openssl?
  • 我已经尝试了那个问题的答案,但它不起作用
  • 是的,我试过启用 lib-openssl 仍然不起作用
  • 你试过用'新' php 运行作曲家吗?试试这个命令/usr/local/Cellar/php56/5.6.30_6/bin/php composer require weidner/goutte

标签: php macos laravel openssl composer-php


【解决方案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

希望这会有所帮助!

【讨论】:

  • 非常感谢您的回答。对于为什么我不能使用 .bash_profile 更改 php 版本,我仍然有点困惑,但这解决了这个问题。谢谢。
猜你喜欢
  • 2017-02-14
  • 1970-01-01
  • 2018-11-22
  • 2023-03-15
  • 1970-01-01
  • 1970-01-01
  • 2017-07-31
  • 2017-03-18
  • 2019-03-09
相关资源
最近更新 更多