정보 보안을 향한 항해

yum "[Errno 14] Peer cert cannot be verified or peer cert invalid" 버그 해결 본문

OS 오류/Linux 오류

yum "[Errno 14] Peer cert cannot be verified or peer cert invalid" 버그 해결

금홍자 2021. 10. 5. 09:15

CentOS6 에서 나타나는 버그다.

 

 

# /etc/yum.conf에 sslverify=false를 추가하여 SSL 유효성 검사를 비활성화 한 후

 

# yum --disablerepo=\* --enablerepo=base,updates update

 

하면 해결 된다.

 

안되면 /etc/yum.repos.d/CentOS-Base.repo

파일이 아래와 일치하는지 확인한다

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

그리고

# yum clean all

 

 


그래도 안 된다면

# wget -O /etc/yum.repos.d/CentOS-Base.repo https://www.host-stage.net/hsmirrors/centos6repofix

# yum clean all