最近使用composer发现报如下错误:
`
[Composer\Downloader\TransportException]
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:
cd ~ && wget http://curl.haxx.se/ca/cacert.pem --no-check-certificate
2: Export it:
export COMPOSER_CAFILE='~/cacert.pem'
这个路径必需是第一步下载文件的位置
3: Run composer:
composer install

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

标签: none

添加新评论