php-编写器更新返回证书验证失败
当我尝试执行php-编写器更新返回证书验证失败,php,laravel,terminal,composer-php,Php,Laravel,Terminal,Composer Php,当我尝试执行composer安装或composer更新时,会收到一条错误消息,表明无法验证SSL证书 [Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Er
composer安装
或composer更新
时,会收到一条错误消息,表明无法验证SSL证书
[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 ver
ify failed
Failed to enable crypto
failed to open stream: operation failed
有人知道我如何解决这个问题吗?我自己没有遇到过这个问题,但在快速搜索之后,我找到了一个潜在的解决方案(如果您使用的是PHP 5.6):
来源:(这里还有其他可能解决此问题的方法。希望有帮助!请粘贴composer文件的内容您当前的PHP版本是什么?@JaredChu我的PHP版本是5.6。24@PeeHaa抱歉!现在错误信息应该是文本。嗯,请尝试这个
# update the ports tree (software list)
$ sudo port -v selfupdate
# install php (shortcut for compiling php with our required libs)
$ sudo port install php56
# install the mcrypt library for php
$ sudo port install php56-mcrypt
# install the curl library for php
$ sudo port install php56-curl
# configure which php version your system should use
$ sudo port select php php56