CentOS 7 broke. Redhat destroyed it further. Now we’ve moved on to Debian, Ubuntu (that we always had), and Alma Linux.
These are the clues:
yum update fails
yum upgrade fails
Repos give 404s, for example:
http://mirror.centos.org/centos/7/sclo/x86_64/rh/repodata/repomd.xml: [Errno 14] HTTP Error 404 – Not Found
But what if you still have legacy CentOS 7 around and it doesn't want to update? You could try this: sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
Strait after making these changes, try updating or installing a few files again (e.g. yum install mc).
Cannot find a valid baseurl for repo: centos-sclo-sclo
mv /etc/yum.repos.d/CentOS-SCLo-scl.repo /root or cd /etc/yum.repos.d mv CentOS-SCLo-scl.repo /root
You will cry at Stack
sqlite problems
Disable that bad repo
yum-config-manager --disable centos-sclo-rh yum-config-manager --disable centos-sclo-sclo
Maybe try this if it fails again:
yum remove sclo-php55-php-pecl-imagick
Package wbm-virtual-server-7.20.1.gpl-1.noarch.rpm is not signed
yum upgrade --nogpgcheck
2 thoughts on “CentOS is out of date – fix can be sort of fixed for yum update and yum upgrade”
virtualmin setup-repos did not change the contents of /etc/yum.repos.d/virtualmin.repo on my CentOS 7 (although the timestamp of the file changed) so I tried a manual update:
wget https://software.virtualmin.com/vm/7/rpm/virtualmin-gpl-release.noarch.rpm
rpm -Uvh virtualmin-gpl-release.noarch.rpm
warning: virtualmin-gpl-release.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID b9a0b8b7: NOKEY
Preparing… ################################# [100%]
file /etc/pki/rpm-gpg/RPM-GPG-KEY-webmin from install of virtualmin-gpl-release-7.0-1.noarch conflicts with file from package virtualmin-release-6.0-3.gpl.noarch
file /etc/yum.repos.d/virtualmin.repo from install of virtualmin-gpl-release-7.0-1.noarch conflicts with file from package virtualmin-release-6.0-3.gpl.noarch
yum remove virtualmin-release-6.0-3.gpl.noarch
rpm -Uvh virtualmin-gpl-release.noarch.rpm
yum clean all
yum upgrade
Fix Centos 7 yum Error for update
Delete All Repos on Dir /etc/yum.repos.d
Then Create File CentOS-Base.repo
Copy And Paste Thi Text And Save It
[base]
name=CentOS-$releasever – Base
baseurl=https://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
#released updates
[updates]
name=CentOS-$releasever – Updates
baseurl=https://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – CentosPlus
baseurl=https://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=0
then
yum clean all
yum update -y
its working