Lib-OpenSSL依赖问题在OSX上发布了Laravel和Composer

时间:2016-05-30 22:18:18

标签: macos laravel openssl composer-php jwt

我的问题

简而言之,当我运行composer update时,我收到以下错误:

  Problem 1
    - tymon/jwt-auth 0.5.4 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.5 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.6 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.7 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.8 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
    - tymon/jwt-auth 0.5.1 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.2 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.3 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.0 requires namshi/jose 2.0.* -> satisfiable by namshi/jose[2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - 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.1 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.0 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 2.2.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 2.2.1 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 2.2.0 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 2.0.3 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 2.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 2.0.1 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 2.0.0 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 tymon/jwt-auth 0.5.* -> satisfiable by tymon/jwt-auth[0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9].

其他信息

我不确定这个问题的原因,因为我不能确定它何时出现。我所知道的是,它已经过去了几天,甚至可能在今天早些时候......

我今天做了一些可能导致这种情况的事情:

上述所有内容可能与此完全无关,可能纯属巧合

我尝试过什么

我已经忘记了我尝试的事情的数量,但这里有几个:

  • "tymon/jwt-auth": "0.5.*"的版本更改为最新的alpha版本(这很有效,但我遇到了JWT-Auth的实施问题)所以我不得不还原
  • 我花了很多时间玩各个依赖项的版本,虽然这样做,但不可避免地改变了错误信息,但它们仍然没有解决问题
  • 我使用brew upgrade openssl升级到最新版本的openssl。但是,这并没有在PHP中更新openssl,因为我正在使用MAMP(我认为),并且我无法控制使用哪个版本的openssl PHP编译...

我的研究

我花了几个小时搜索各种网站,尝试各种各样的事情并探索许多潜在的解决方案,但没有任何东西,但是,我已经解决了这个问题。这些是我发现的一些网站/页面:

5 个答案:

答案 0 :(得分:18)

http://www.farces.com/wikis/naked-server/php/php-openssl/  按照上面链接中的步骤,它将解决问题

答案 1 :(得分:13)

我在Mac和MAMP上遇到同样的问题,我跟踪它检查我的苹果PHP版本而不是我的MAMP版本。我通过从/ usr / local / bin创建一个符号链接到我的MAMP PHP来解决这个问题。

cd /usr/local/bin
sudo ln /Applications/MAMP/bin/php/php7.0.10/bin/php php

答案 2 :(得分:0)

在我的情况下,这是一个没有php mcrypt的问题,这意味着php没有使用openssl支持进行编译。安装php70-mcrypt为我解决了这个问题。请注意它将重新编译php。

brew install php70-mcrypt

我目前的版本是:

  • Homebrew 1.1.1
  • Homebrew / homebrew-core(git revision 81b69; last commit 2016-11-20)
  • PHP 7.0.13(cli)(建于2016年11月21日11:26:59)(NTS)
  • OSX El Capitan 10.11.6

干杯!

答案 3 :(得分:0)

我正在使用MAMP,因此需要告诉我的Mac使用MAMP版本的PHP。

在终端中,运行:

nano ~/.bash_profile export PATH=/Applications/MAMP/bin/php/php5.6.27/bin:$PATH

然后退出终端并尝试再次运行composer install

答案 4 :(得分:0)

在Mamp Pro的最新版本(本回答时为4.1版)中,有一个选项可以在命令行上使用Mamp Pro版本的PHP,这是我认为最简单的解决方案。

首先,打开MAMP Pro主窗口并从左侧菜单中选择PHP:

Select PHP from the menu

然后在您选择要运行的PHP版本的下方,有一个复选框,以#34;在命令行上提供此版本"。

Checkbox to make this version available on the command line

然后只需保存更改并重新启动终端。如果键入php -v,您应该会看到PHP的更新版本。