【问题标题】:namshi/jose 5.0.2 requires lib-opensslnamshi/jose 5.0.2 需要 lib-openssl
【发布时间】:2017-03-01 13:05:53
【问题描述】:

我正在尝试作曲家更新,但它说:

composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
    - 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].
    - tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.4 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.5 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.6 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.7 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.8 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - 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.
    - 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 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 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].

我试图通过互联网搜索但仍然无法修复,我正在使用运行 macOS Sierra 的 XAMPP,我也已经尝试过:

php -i | grep "SSL Version"
SSL Version => SecureTransport
rm /usr/local/bin/openssl
sudo ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/local/bin/openssl
sudo chown root:wheel /usr/local

但还是这样

php -i | grep "SSL Version"
SSL Version => SecureTransport

我尝试的另一个选项:

brew link openssl --force Warning: Refusing to link: openssl Linking keg-only openssl means you may end up linking against the insecure, deprecated system OpenSSL while using the headers from Homebrew's openssl. Instead, pass the full include/library paths to your compiler e.g.: -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib

我检查了我的 OpenSSL 版本:

openssl OpenSSL> version OpenSSL 1.0.2j 26 Sep 2016

也尝试过:

    ls -lash /usr/local/bin/openssl 8 lrwxr-xr-x 1 root admin 44B Oct 20 01:18 /usr/local/bin/openssl -> /usr/local/Cellar/openssl/1.0.2j/bin/openssl and ls -lash /usr/local/Cellar/openssl/1.0.2j/bin/openssl 1064 -r-xr-xr-x 1 aryo admin 528K Oct 19 17:38 /usr/local/Cellar/openssl/1.0.2j/bin/openssl
ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/local/bin/openssl ln: /usr/local/bin/openssl: File exists

【问题讨论】:

  • 你可能需要openssl-devel
  • 我不确定 - 看起来事情有点乱。看起来您安装了多个版本,但路径或链接可能已损坏/错误 - 对不起,这超出了我的范围。此链接可能会有所帮助; apple.stackexchange.com/questions/126830/…
  • 看看那个文件 - 它是一个“真实”文件还是一个(死)链接?
  • ls -lash /usr/local/bin/opensslls -lash /usr/local/Cellar/openssl/1.0.2j/bin/openssl 应该都显示给你
  • 看起来/usr/local/bin/openssl已经链接到/usr/local/Cellar/openssl/1.0.2j/bin/openssl

标签: php macos laravel xampp jwt


【解决方案1】:

这是 macOS Sierra 的问题。同样的事情也发生在我身上。我升级到 Sierra,然后我的整个开发环境都出现了类似的错误。我不得不降级到 El Capitan。

【讨论】:

    【解决方案2】:

    问题在于 MacOS Sierra 使用了 Composer 未正确检测到的“Native OpenSSL”实现。您可以通过执行以下命令行来验证它:

    php -i | grep OpenSSL
    

    如果您看到 LibreSSL,请尝试使用 Homebrew 重新编译 OpenSSL:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    brew tap homebrew/dupes
    brew tap homebrew/versions
    brew tap homebrew/php
    brew install curl --with-libssh2 --with-openssl
    

    现在您的 OpenSSL 实现应该是 OpenSSL 并且 namshi/jose 的安装应该可以正常工作。你可以看到关于这个话题的讨论on my Jose project

    【讨论】:

      猜你喜欢
      • 2017-05-16
      • 2016-09-27
      • 2016-01-05
      • 1970-01-01
      • 2015-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-28
      相关资源
      最近更新 更多