在OSX系统上,安装了XAMPP,PHP 5.6.3。
composer self-update
和
composer update
失败并显示以下消息:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version"; file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
openssl安装或证书有问题。 我该如何解决这个问题?
答案 0 :(得分:5)
我建议采取以下步骤:
php.ini
- extension=php_openssl.so
确保您在php.ini
curl.cainfo=/full/path/to/ssl/certs/ca-bundle.crt
openssl.cafile=/full/path/to/ssl/certs/ca-bundle.crt
如果缺少证书,请下载http://curl.haxx.se/ca/cacert.pem并重命名为ca-bundle.crt
修改php.ini后重启PHP并尝试再次运行你的作曲家命令。
答案 1 :(得分:-3)
尝试可行的sudo composer self-update
。