【问题标题】:Lib-OpenSSL Dependency issue Laravel and Composer on OSXOSX 上的 Lib-OpenSSL 依赖问题 Laravel 和 Composer
【发布时间】:2016-09-28 18:59:50
【问题描述】:

我的问题

简而言之,当我运行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 编译...

我的研究

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

【问题讨论】:

    标签: macos laravel openssl composer-php jwt


    【解决方案1】:

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

    【讨论】:

    • 如果我能给你 50 票我会的!!!太感谢了!你救了我的命!!!!谢谢谢谢谢谢!!!!!!
    【解决方案2】:

    我在 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
    

    【讨论】:

    • 这对我有用,谢谢 - 我需要先升级 MAMP PRO 3.5 -> 4.0.5
    • 嗨 @Dayveian 现在我的 php 工匠没有提供任何帮助?
    【解决方案3】:

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

    brew install php70-mcrypt

    我目前的版本是:

    • 自制 1.1.1
    • Homebrew/homebrew-core(git 修订版 81b69;最后一次提交 2016-11-20)
    • PHP 7.0.13 (cli)(构建时间:2016 年 11 月 21 日 11:26:59)(NTS)
    • OSX El Capitan 10.11.6

    干杯!

    【讨论】:

      【解决方案4】:

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

      在终端中,运行:

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

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

      【讨论】:

        【解决方案5】:

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

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

        然后在您选择要运行的 PHP 版本的下方,有一个“使该版本在命令行上可用”的复选框。

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

        【讨论】:

          猜你喜欢
          • 2016-09-27
          • 1970-01-01
          • 2015-05-28
          • 2013-11-04
          • 2013-05-21
          • 2014-09-18
          • 2014-10-04
          • 2022-01-13
          • 2017-12-23
          相关资源
          最近更新 更多