GENWiki

Premier IT Outsourcing and Support Services within the UK

User Tools

Site Tools


computerfaq:centos_8_unable_to_update_with_dnf

If you upgraded to Centos 8 and are now finding that dnf no longer updates and gives an error that it can't find mirrors:

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

Then this is because Redhat decided to withdraw Centos 8 and instead not provide a 'free to use' stable linux distribution anymore. Most of us who use(d) RedHat also had at least one CentOS distribution to run as a test system but this can now no longer be done and you will need to license additional servers for this purpose (RedHat do provide 'free' developer licenses - but there is nothing to stop them changing that and leaving customers in the crap again), OR, move to another distribution as many have done. We moved to OracleLinux which so far is looking positive and we've not renewed our RedHat contacts this year.

To get your Centos 8 back updating and migrate to Centos 8 stream (which is considered unstable) you will need to attempt the following (Note, this worked for us, but there are way too many variables to guarantee it'll work perfectly for everyone, there may be dependencies that you'll need to resolve) :

Image/Backup the server

Login as root

Execute:

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
dnf install centos-release-stream -y
dnf swap centos-{linux,stream}-repos -y
dnf distro-sync -y

You will probably need to reboot after this has all finished.

/home/gen.uk/domains/wiki.gen.uk/public_html/data/pages/computerfaq/centos_8_unable_to_update_with_dnf.txt · Last modified: 2022/07/09 09:39 by genadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki