系统是CentOS 6.6的,curl访问https报错。

nss error -12190 这个错误说明系统预埋的CA需要更新了。

一句话解决:

yum update -y nss curl libcurl  

鬼畜的是,yum的CentOS-Base.repo被改成了本地,根本没有可以升级的东西,shit,增加一段网易的mirror吧

[base]
name=CentOS-6 - Base - 163.com  
baseurl=http://mirrors.163.com/centos/6/os/$basearch/  
gpgcheck=1  
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[updates]
name=CentOS-6 - Updates - 163.com  
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/  
gpgcheck=1  
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[extras]
name=CentOS-6 - Extras - 163.com  
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/  
gpgcheck=1  
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[centosplus]
name=CentOS-6 - Plus - 163.com  
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/  
gpgcheck=1  
enabled=1  
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[contrib]
name=CentOS-6 - Contrib - 163.com  
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/  
gpgcheck=1  
enabled=1  
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6  

再执行,就搞定

comments powered by Disqus