解决执行 pecl upgrade-all
提示 Error getting channel info from pear.php.net: Connection to `ssl://pear.php.net:443' failed:
和 Connection to 'ssl://pecl.php.net:443' failed: Unable to find the socket
错误。
出现这个错误主要是因为缺失默认证书导致的,具体原因不明。
下面说一下解决方案:
1、查看 default_cert_file 的路径
php -r "print_r(openssl_get_cert_locations());"
2、下载证书
wget -P /etc/ssl/ http://curl.haxx.se/ca/cacert.pem
chmod 744 /etc/ssl/cacert.pem
注意:其中 /etc/ssl/cacert.pem 替换为自己的真实路径