I have installed CentOS 6 in VM and trying to install few packages
yum install command gives the following error
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
http://vault.centos.org/6/os/x86_64/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
I have checked many answers but none worked. Can anyone guide, please?
The problem is because the ca-certificate package is outdated on your system. To correct this problem :
wget https://vault.centos.org/6.10/updates/x86_64/Packages/ca-certificates-2020.2.41-65.1.el6_10.noarch.rpm --no-check-certificate
rpm -iU ca-certificates-2020.2.41-65.1.el6_10.noarch.rpm
Please keep in mind that CentOS 6 is no longer in production, and due to the changing landscape of security certificates, there is no guarantee this fix will work forever.