pecl安装扩展时443

Q
$ pecl search redis
Connection to `ssl://pecl.php.net:443' failed:
A
# 1. 查看openssl是否正常
$ openssl version
LibreSSL 2.2.7

# 2. 查看证书相关目录
$ php -r "print_r(openssl_get_cert_locations());"
Array
(
    [default_cert_file] => /usr/local/openssl/ssl/cert.pem
    [default_cert_file_env] => SSL_CERT_FILE
    [default_cert_dir] => /usr/local/openssl/ssl/certs
    [default_cert_dir_env] => SSL_CERT_DIR
    [default_private_dir] => /usr/local/openssl/ssl/private
    [default_default_cert_area] => /usr/local/openssl/ssl
    [ini_cafile] =>
    [ini_capath] =>
)

# 3. 若/usr/local/openssl/ssl目录下没有cert.pem文件,则
$ wget -c http://curl.haxx.se/ca/cacert.pem  /usr/local/openssl/ssl/cert.pem
    原文作者:AC小良
    原文地址: https://www.jianshu.com/p/059c88417ca8
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞