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

你可能感兴趣的:(pecl安装扩展时443)