最近使用composer发现报如下错误:
`
[ComposerDownloaderTransportException]
The "https://packagist.org/packages.json" 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
`

1º: 下载certificate:
wget http://curl.haxx.se/ca/cacert.pem --no-check-certificate
2º: Export it:
export COMPOSER_CAFILE='/home/user/cacert.pem'
这个路径必需是第一步下载文件的位置
3º: Run composer:
composer install

from: https://github.com/composer/composer/issues/3346#issuecomment-285460207

标签: none

添加新评论