CentOS – How to Update CentOS 8

amazon-web-servicescentos

yum --v update on a Fresh install of CentOS 8 at AWS, I get:

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

A bit of reading shows that CentOS 8 appears to becoming CentOS Stream 8, and all the mirrors are showing that the product is end-of-life: http://mirror.centos.org/centos-8/8/readme

If I open up /etc/yum.repos.d/CentOS-AppStream.repo the url referenced there resolves to: http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=ec2
and that appears to be the cause of the issue above. As it says

'Invalid release/repo/arch combination'

What to do? Is CentOS 7 my only option. I cant find any "CentOS Stream 8" images in AWS.

Best Answer

The URL should be http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=ec2, specifically with 8-stream as the release.

There's some other instructions on swapping from non-stream to stream on the official pages here: https://www.centos.org/centos-stream/

Also note that if you're using AWS, then you may want to make use of building AMIs to provide stable images to your environment based on stream. It's easy enough to set up a pipeline to build a base image each week that can then be used for testing and deployment. This can mitigate some of the 'risk' with using a stream-based release.