2017-01-01 24 views
1

我看了其他問題,但我找不到解決方案。當試圖安裝JWT包時,我得到一個錯誤,如標題中所述。namshi/jose 5.0.2需要lib-openssl上macosx

我在Mac OS X Sierra上使用xampp版本7.0.8與PHP 5.6。我得到的錯誤如下。

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]. 

謝謝。

回答

0

使用the Jose library I developed的人遇到了同樣的問題。你可以看到他打開的問題on this page

問題是,在MacOS Sierra上,作曲家未正確檢測到OpenSSL實現,如果庫需要lib-openssl,則會顯示此消息。

您可以通過執行以下命令行驗證OpenSSL實現:

php -i | grep OpenSSL 

如果你看到LibreSSL然後嘗試去改變它:

/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應該可以正常工作。

+0

謝謝!我在安裝了mamp之後嘗試了它並且工作正常。 – ccoeder