异常信息
System.PlatformNotSupportedException: The handler does not support custom handling of certificates with this combination of libcurl (7.29.0) and its SSL backend (\"NSS/3.28.4\")
at System.Net.HttpWebRequest.GetResponse()
at System.Net.WebClient.GetWebResponse(WebRequest request)
at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream)
更新curl
下载最新版
wget https://curl.haxx.se/download/curl-7.57.0.tar.gz
# 官方地址:https://curl.haxx.se/download.html
解压编译
# yum install openssl-devel gcc #安装openssl和gcc
tar -zxf curl-7.57.0.tar.gz
cd curl-7.57.0
./configure --prefix=/usr/local/curl/ --without-nss --with-ssl=/usr/local/ssl/
make && make install
替换系统curl
备份curl
mv /usr/bin/curl /usr/bin/curl.bak
创建link
ln -s /usr/local/curl/bin/curl /usr/bin/curl
编辑ld.so.conf
vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/curl/lib
验证安装
重新load配置
ldconfig
查看版本
curl -V