今天配置Git环境,更新了依赖包,结果curl变成了nss模式的ssl,导致线上的所有curl请求没有返回值。
将curl的版本从NSS转换为OpenSSL的方法
先yum update openssl
再yum update curl
curl -V
查看版本信息是否已经转为OpenSSL
已经显示OpenSSL重启php-fpm
这方法我试了不行
其他方式
下载curl重新编译安装
wget https://curl.haxx.se/download/curl-7.29.0.tar.gz #可以下载任意版本的curl软件包我的是29
tar xf curl-7.29.0.tar.gz #解压文件
cd curl-7.29.0 #进入文件
编译安装
./configure --without-nss --with-ssl && make &&make install
without表示不安装nss版本 with表示安装OpenSSL版本
添加配置文件
echo "/usr/local/lib" >>/etc/ld.so.conf
ldconfig
curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 OpenSSL/1.0.2k zlib/1.2.7
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz