问题描述
我看了其他问题,但找不到解决方案.尝试安装 JWT 包中出现标题中提到的错误.
I looked at other questions, but I could not find a solution.While trying to install JWT package I get an error as mentioned in the title.
我在Mac OS X Sierra和PHP 5.6上使用的xampp版本7.0.8,得到的错误如下.
I am using xampp version 7.0.8 on mac os x Sierra with PHP 5.6.The error I get is as follows.
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.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.
- tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.0, 5.0.1, 5.0.2].
- Installation request for tymon/jwt-auth ^0.5.9 -> satisfiable by tymon/jwt-auth[0.5.9].
谢谢.
推荐答案
使用 Jose库的人开发的遇到了同样的问题.您可以在此页面上打开.
Someone who uses the Jose library I developed had encountered the same problem. You can see the issue he opened on this page.
问题在于,在MacOS Sierra上,作曲者未正确检测到OpenSSL实现,并且如果库需要lib-openssl
,则会出现此消息.
The problem is that on MacOS Sierra the OpenSSL implementation is not correctly detected by composer and if a library needs lib-openssl
then this message appears.
您可以通过执行以下命令行来验证您的OpenSSL实现:
You can verify your OpenSSL implementation by executing the following command line:
php -i | grep OpenSSL
如果看到LibreSSL
,请尝试进行更改:
If you see LibreSSL
then try to change it:
/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
的安装应该可以正常工作.
Now your OpenSSL implementation should be OpenSSL
and the installation of namshi/jose
should work fine.
这篇关于namshi/jose 5.0.2在macosx上需要lib-openssl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!