YUM:[Errno 14] problem making ssl connection

有时候在使用YUM的时候,你会出现如题所示的问题,具体如下:

[root@mha1 c++]# yum install -y glib2-devel libpcap-devel libnet-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
 * extras: mirrors.163.com
 * remi-safe: mirrors.thzhost.com
 * updates: mirrors.aliyun.com
LocalPercona                                                                                                               | 2.9 kB     00:00 ... 
LocalPercona/primary_db                                                                                                    |  16 kB     00:00 ... 
http://download.fedoraproject.org/pub/epel/6/x86_64/repodata/repomd.xml: [Errno 14] problem making ssl connection
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
[root@mha1 c++]# 

对于该问题,需要首先禁用出问题的YUM源(enabled=0),然后安装ca-certificates包:
yum install ca-certificates

可以看到,上面出问题的是EPEL源。

先禁用:

[root@mha1 ~]# cat /etc/yum.repos.d/epel.repo 
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=0

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=0
[root@mha1 ~]# 

然后,安装软件包:

[root@mha1 ~]# yum install ca-certificates
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * extras: mirrors.163.com
 * remi-safe: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.aliyun.com
extras                                                                                                                     | 3.4 kB     00:00     
updates                                                                                                                    | 3.4 kB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ca-certificates.noarch 0:2010.63-3.el6_1.5 will be updated
---> Package ca-certificates.noarch 0:2015.2.6-65.0.1.el6_7 will be an update
--> Processing Dependency: p11-kit-trust >= 0.18.4-2 for package: ca-certificates-2015.2.6-65.0.1.el6_7.noarch
--> Processing Dependency: p11-kit >= 0.18.4-2 for package: ca-certificates-2015.2.6-65.0.1.el6_7.noarch
--> Running transaction check
---> Package p11-kit.x86_64 0:0.18.5-2.el6_5.2 will be installed
---> Package p11-kit-trust.x86_64 0:0.18.5-2.el6_5.2 will be installed
--> Processing Conflict: p11-kit-trust-0.18.5-2.el6_5.2.x86_64 conflicts nss < 3.14.3-33
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package nss.x86_64 0:3.13.3-6.el6 will be updated
--> Processing Dependency: nss = 3.13.3-6.el6 for package: nss-tools-3.13.3-6.el6.x86_64
--> Processing Dependency: nss = 3.13.3-6.el6 for package: nss-sysinit-3.13.3-6.el6.x86_64
---> Package nss.x86_64 0:3.21.3-2.el6_8 will be an update
--> Processing Dependency: nss-util >= 3.21.0 for package: nss-3.21.3-2.el6_8.x86_64
--> Processing Dependency: nss-softokn(x86-64) >= 3.14.3-22 for package: nss-3.21.3-2.el6_8.x86_64
--> Processing Dependency: nspr >= 4.11.0 for package: nss-3.21.3-2.el6_8.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.21)(64bit) for package: nss-3.21.3-2.el6_8.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.17.1)(64bit) for package: nss-3.21.3-2.el6_8.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.15)(64bit) for package: nss-3.21.3-2.el6_8.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.14)(64bit) for package: nss-3.21.3-2.el6_8.x86_64
--> Running transaction check
---> Package nspr.x86_64 0:4.9-1.el6 will be updated
---> Package nspr.x86_64 0:4.11.0-1.el6 will be an update
---> Package nss-softokn.x86_64 0:3.12.9-11.el6 will be updated
---> Package nss-softokn.x86_64 0:3.14.3-23.3.el6_8 will be an update
--> Processing Dependency: nss-softokn-freebl(x86-64) >= 3.14.3-23.3.el6_8 for package: nss-softokn-3.14.3-23.3.el6_8.x86_64
---> Package nss-sysinit.x86_64 0:3.13.3-6.el6 will be updated
---> Package nss-sysinit.x86_64 0:3.21.3-2.el6_8 will be an update
---> Package nss-tools.x86_64 0:3.13.3-6.el6 will be updated
---> Package nss-tools.x86_64 0:3.21.3-2.el6_8 will be an update
---> Package nss-util.x86_64 0:3.13.3-2.el6 will be updated
---> Package nss-util.x86_64 0:3.21.3-1.el6_8 will be an update
--> Running transaction check
---> Package nss-softokn-freebl.x86_64 0:3.12.9-11.el6 will be updated
---> Package nss-softokn-freebl.x86_64 0:3.14.3-23.3.el6_8 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================
 Package                                Arch                       Version                                      Repository                   Size
==================================================================================================================================================
Updating:
 ca-certificates                        noarch                     2015.2.6-65.0.1.el6_7                        base                        1.2 M
 nss                                    x86_64                     3.21.3-2.el6_8                               updates                     859 k
Installing for dependencies:
 p11-kit                                x86_64                     0.18.5-2.el6_5.2                             base                         94 k
 p11-kit-trust                          x86_64                     0.18.5-2.el6_5.2                             base                         71 k
Updating for dependencies:
 nspr                                   x86_64                     4.11.0-1.el6                                 base                        114 k
 nss-softokn                            x86_64                     3.14.3-23.3.el6_8                            updates                     262 k
 nss-softokn-freebl                     x86_64                     3.14.3-23.3.el6_8                            updates                     168 k
 nss-sysinit                            x86_64                     3.21.3-2.el6_8                               updates                      47 k
 nss-tools                              x86_64                     3.21.3-2.el6_8                               updates                     437 k
 nss-util                               x86_64                     3.21.3-1.el6_8                               updates                      67 k

Transaction Summary
==================================================================================================================================================
Install       2 Package(s)
Upgrade       8 Package(s)

Total download size: 3.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/10): ca-certificates-2015.2.6-65.0.1.el6_7.noarch.rpm                                                                   | 1.2 MB     00:02     
(2/10): nspr-4.11.0-1.el6.x86_64.rpm                                                                                       | 114 kB     00:00     
(3/10): nss-3.21.3-2.el6_8.x86_64.rpm                                                                                      | 859 kB     00:01     
(4/10): nss-softokn-3.14.3-23.3.el6_8.x86_64.rpm                                                                           | 262 kB     00:00     
(5/10): nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64.rpm                                                                    | 168 kB     00:00     
(6/10): nss-sysinit-3.21.3-2.el6_8.x86_64.rpm                                                                              |  47 kB     00:00     
(7/10): nss-tools-3.21.3-2.el6_8.x86_64.rpm                                                                                | 437 kB     00:00     
(8/10): nss-util-3.21.3-1.el6_8.x86_64.rpm                                                                                 |  67 kB     00:00     
(9/10): p11-kit-0.18.5-2.el6_5.2.x86_64.rpm                                                                                |  94 kB     00:00     
(10/10): p11-kit-trust-0.18.5-2.el6_5.2.x86_64.rpm                                                                         |  71 kB     00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                             439 kB/s | 3.3 MB     00:07     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : nspr-4.11.0-1.el6.x86_64                                                                                                      1/18 
  Updating   : nss-util-3.21.3-1.el6_8.x86_64                                                                                                2/18 
  Updating   : nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64                                                                                   3/18 
  Installing : p11-kit-0.18.5-2.el6_5.2.x86_64                                                                                               4/18 
  Updating   : nss-softokn-3.14.3-23.3.el6_8.x86_64                                                                                          5/18 
  Updating   : nss-sysinit-3.21.3-2.el6_8.x86_64                                                                                             6/18 
  Updating   : nss-3.21.3-2.el6_8.x86_64                                                                                                     7/18 
  Installing : p11-kit-trust-0.18.5-2.el6_5.2.x86_64                                                                                         8/18 
  Updating   : ca-certificates-2015.2.6-65.0.1.el6_7.noarch                                                                                  9/18 
  Updating   : nss-tools-3.21.3-2.el6_8.x86_64                                                                                              10/18 
  Cleanup    : nss-tools-3.13.3-6.el6.x86_64                                                                                                11/18 
  Cleanup    : ca-certificates-2010.63-3.el6_1.5.noarch                                                                                     12/18 
  Cleanup    : nss-sysinit-3.13.3-6.el6.x86_64                                                                                              13/18 
  Cleanup    : nss-3.13.3-6.el6.x86_64                                                                                                      14/18 
  Cleanup    : nss-softokn-3.12.9-11.el6.x86_64                                                                                             15/18 
  Cleanup    : nss-util-3.13.3-2.el6.x86_64                                                                                                 16/18 
  Cleanup    : nspr-4.9-1.el6.x86_64                                                                                                        17/18 
  Cleanup    : nss-softokn-freebl-3.12.9-11.el6.x86_64                                                                                      18/18 
  Verifying  : p11-kit-0.18.5-2.el6_5.2.x86_64                                                                                               1/18 
  Verifying  : nss-softokn-3.14.3-23.3.el6_8.x86_64                                                                                          2/18 
  Verifying  : nspr-4.11.0-1.el6.x86_64                                                                                                      3/18 
  Verifying  : nss-3.21.3-2.el6_8.x86_64                                                                                                     4/18 
  Verifying  : nss-tools-3.21.3-2.el6_8.x86_64                                                                                               5/18 
  Verifying  : nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64                                                                                   6/18 
  Verifying  : nss-sysinit-3.21.3-2.el6_8.x86_64                                                                                             7/18 
  Verifying  : ca-certificates-2015.2.6-65.0.1.el6_7.noarch                                                                                  8/18 
  Verifying  : p11-kit-trust-0.18.5-2.el6_5.2.x86_64                                                                                         9/18 
  Verifying  : nss-util-3.21.3-1.el6_8.x86_64                                                                                               10/18 
  Verifying  : nspr-4.9-1.el6.x86_64                                                                                                        11/18 
  Verifying  : nss-3.13.3-6.el6.x86_64                                                                                                      12/18 
  Verifying  : nss-sysinit-3.13.3-6.el6.x86_64                                                                                              13/18 
  Verifying  : nss-tools-3.13.3-6.el6.x86_64                                                                                                14/18 
  Verifying  : ca-certificates-2010.63-3.el6_1.5.noarch                                                                                     15/18 
  Verifying  : nss-util-3.13.3-2.el6.x86_64                                                                                                 16/18 
  Verifying  : nss-softokn-3.12.9-11.el6.x86_64                                                                                             17/18 
  Verifying  : nss-softokn-freebl-3.12.9-11.el6.x86_64                                                                                      18/18 

Dependency Installed:
  p11-kit.x86_64 0:0.18.5-2.el6_5.2                                    p11-kit-trust.x86_64 0:0.18.5-2.el6_5.2                                   

Updated:
  ca-certificates.noarch 0:2015.2.6-65.0.1.el6_7                                    nss.x86_64 0:3.21.3-2.el6_8                                   

Dependency Updated:
  nspr.x86_64 0:4.11.0-1.el6                  nss-softokn.x86_64 0:3.14.3-23.3.el6_8         nss-softokn-freebl.x86_64 0:3.14.3-23.3.el6_8        
  nss-sysinit.x86_64 0:3.21.3-2.el6_8         nss-tools.x86_64 0:3.21.3-2.el6_8              nss-util.x86_64 0:3.21.3-1.el6_8                     

Complete!
[root@mha1 ~]# 

然后,重新启用YUM源:

[root@mha1 ~]# cat /etc/yum.repos.d/epel.repo 
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=0

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=0
[root@mha1 ~]# 

再次尝试之前失败的安装:

[root@mha1 ~]# yum install -y glib2-devel libpcap-devel libnet-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * extras: mirrors.163.com
 * remi-safe: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.aliyun.com
epel                                                                                                                       | 4.3 kB     00:00     
epel/primary_db                                                                                                            | 5.9 MB     00:17     
Setting up Install Process
Package glib2-devel-2.28.8-5.el6.x86_64 already installed and latest version
Package 14:libpcap-devel-1.4.0-4.20130826git2dbcaa1.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package libnet-devel.x86_64 0:1.1.6-7.el6 will be installed
--> Processing Dependency: libnet(x86-64) = 1.1.6-7.el6 for package: libnet-devel-1.1.6-7.el6.x86_64
--> Processing Dependency: libnet.so.1()(64bit) for package: libnet-devel-1.1.6-7.el6.x86_64
--> Running transaction check
---> Package libnet.x86_64 0:1.1.6-7.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================
 Package                               Arch                            Version                                Repository                     Size
==================================================================================================================================================
Installing:
 libnet-devel                          x86_64                          1.1.6-7.el6                            epel                          181 k
Installing for dependencies:
 libnet                                x86_64                          1.1.6-7.el6                            epel                           58 k

Transaction Summary
==================================================================================================================================================
Install       2 Package(s)

Total download size: 239 k
Installed size: 1.4 M
Downloading Packages:
(1/2): libnet-1.1.6-7.el6.x86_64.rpm                                                                                       |  58 kB     00:00     
(2/2): libnet-devel-1.1.6-7.el6.x86_64.rpm                                                                                 | 181 kB     00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                             110 kB/s | 239 kB     00:02     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libnet-1.1.6-7.el6.x86_64                                                                                                      1/2 
  Installing : libnet-devel-1.1.6-7.el6.x86_64                                                                                                2/2 
  Verifying  : libnet-1.1.6-7.el6.x86_64                                                                                                      1/2 
  Verifying  : libnet-devel-1.1.6-7.el6.x86_64                                                                                                2/2 

Installed:
  libnet-devel.x86_64 0:1.1.6-7.el6                                                                                                               

Dependency Installed:
  libnet.x86_64 0:1.1.6-7.el6                                                                                                                     

Complete!
[root@mha1 ~]# 

可以看到,已经没问题了。

————————————
Done。

你可能感兴趣的:(Linux,Error)