就喜欢折腾,捣鼓。
这个问题我在网上看到的很多解释方案都不行,大部分都是说用 openssl_get_cert_locations 打印SSL证书路径。然后检查证书是否存在,不存在就去官方下载一个。
然并我的并没有这么简单。
我的证书目录下有个openssl.conf 文件,打开一看,里面有好多处证书文件的路径拼接。一看很明显有不对的地方:
dir = /etc/pki/CA # Where everything is kept
certs = $dir/certs # Where the issued certs are kept
crl_dir = $dir/crl # Where the issued crl are kept
database = $dir/index.txt # database index file.
#unique_subject = no # Set to 'no' to allow creation of
# several ctificates with same subject.
new_certs_dir = $dir/newcerts # default place for new certs.
certificate = $dir/cacert.pem # The CA certificate
serial = $dir/serial # The current serial number
crlnumber = $dir/crlnumber # the current crl number
# must be commented out to leave a V1 CRL
crl = $dir/crl.pem # The current CRL
private_key = $dir/private/cakey.pem# The private key
RANDFILE = $dir/private/.rand # private random number file
检查上面几个文件路径是否有效,改完保存。
然后试下:
pecl search swoole
成功!!!