6

Sorry if this is a very basic question, but I have never really needed to delve into yum/dnf very deeply.

History: I re-built a server which was running Centos 7 when the updates for that stopped. I didn't pay that much attention to what I used for the build, just downloaded the net install and used that to load all I needed.

I did notice no updates were happening, and found something indicating that the update stream was missing from the base distribution. I followed the instructions to add that, and a lot of updates became available.

I also loaded from a complete DVD image a VM on my laptop.

Now: Not seeing any updates on my server. Not for quite a while. That seems odd. It also seems to be 8.0 whereas the VM version is 8.2, and it does get updates.

There is a slight difference when I list repositories;

Server:

# yum repolist enabled
repo id                                               repo name
appstream                                             CentOS Stream 8 - AppStream
baseos                                                CentOS Stream 8 - BaseOS
epel                                                  Extra Packages for Enterprise Linux 8 - x86_64
epel-modular                                          Extra Packages for Enterprise Linux Modular 8 - x86_64
extras                                                CentOS Stream 8 - Extras

VM:

# yum repolist
repo id                                                   repo name
AppStream                                                 CentOS-8 - AppStream
BaseOS                                                    CentOS-8 - Base
extras                                                    CentOS-8 - Extras
google-chrome                                             google-chrome

The VM doesn't need the epel repo, so that is ok. But the listing of the base repos is different ...

Can anyone tell me how to get the correct repos installed for my server??? (Re-building is not an option - it took much too long to get everything working again after the upgrade).


Trying update, I see this, all the time:

# dnf update
Last metadata expiration check: 2:20:32 ago on Sun 29 Nov 2020 11:18:48 AM PST.
Dependencies resolved.
Nothing to do.
Complete!

Log output:

2020-11-29T21:39:19Z DDEBUG Command: dnf update 
2020-11-29T21:39:19Z DDEBUG Installroot: /
2020-11-29T21:39:19Z DDEBUG Releasever: 8
2020-11-29T21:39:19Z DEBUG cachedir: /var/cache/dnf
2020-11-29T21:39:19Z DDEBUG Base command: update
2020-11-29T21:39:19Z DDEBUG Extra commands: ['update']
2020-11-29T21:39:19Z DEBUG User-Agent: constructed: 'libdnf (CentOS Stream 8; generic; Linux.x86_64)'
2020-11-29T21:39:19Z DEBUG repo: using cache for: appstream
2020-11-29T21:39:19Z DEBUG appstream: using metadata from Thu 29 Oct 2020 06:52:17 PM PDT.
2020-11-29T21:39:19Z DEBUG repo: using cache for: baseos
2020-11-29T21:39:19Z DEBUG baseos: using metadata from Thu 29 Oct 2020 06:52:12 PM PDT.
2020-11-29T21:39:19Z DEBUG repo: using cache for: extras
2020-11-29T21:39:19Z DEBUG extras: using metadata from Fri 10 Jul 2020 07:19:28 AM PDT.
2020-11-29T21:39:20Z DEBUG repo: using cache for: epel-modular
2020-11-29T21:39:20Z DEBUG epel-modular: using metadata from Mon 16 Nov 2020 06:30:02 PM PST.
2020-11-29T21:39:20Z DEBUG repo: using cache for: epel
2020-11-29T21:39:20Z DEBUG epel: using metadata from Sat 28 Nov 2020 05:04:32 PM PST.
2020-11-29T21:39:20Z INFO Last metadata expiration check: 2:20:32 ago on Sun 29 Nov 2020 11:18:48 AM PST.
2020-11-29T21:39:20Z DDEBUG timer: sack setup: 420 ms
2020-11-29T21:39:20Z DEBUG Completion plugin: Generating completion cache...
2020-11-29T21:39:20Z DEBUG --> Starting dependency resolution
2020-11-29T21:39:20Z DEBUG --> Finished dependency resolution
2020-11-29T21:39:20Z DDEBUG timer: depsolve: 108 ms
2020-11-29T21:39:20Z INFO Dependencies resolved.
2020-11-29T21:39:20Z INFO Nothing to do.
2020-11-29T21:39:20Z INFO Complete!
2020-11-29T21:39:20Z DDEBUG Cleaning up.
# cat /etc/*-release
CentOS Stream release 8
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
# grep -rH enabled=1 /etc/yum.repos.d/*
/etc/yum.repos.d/CentOS-Stream-AppStream.repo:enabled=1
/etc/yum.repos.d/CentOS-Stream-BaseOS.repo:enabled=1
/etc/yum.repos.d/CentOS-Stream-Extras.repo:enabled=1
/etc/yum.repos.d/epel-modular.repo:enabled=1
/etc/yum.repos.d/epel.repo:enabled=1

NOTE how this differs from my VM:

# grep -rH enabled=1 /etc/yum.repos.d/*
/etc/yum.repos.d/CentOS-AppStream.repo:enabled=1
/etc/yum.repos.d/CentOS-Base.repo:enabled=1
/etc/yum.repos.d/CentOS-Extras.repo:enabled=1
/etc/yum.repos.d/epel-modular.repo:enabled=1
/etc/yum.repos.d/epel.repo:enabled=1
/etc/yum.repos.d/google-chrome.repo:enabled=1

Mirrorlists

On VM:

# find /var -name mirrorlist 
/var/cache/PackageKit/8/metadata/AppStream-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/BaseOS-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/extras-8-x86_64/mirrorlist
/var/cache/dnf/AppStream-a520ed22b0a8a736/mirrorlist
/var/cache/dnf/BaseOS-929b586ef1f72f69/mirrorlist
/var/cache/dnf/extras-2770d521ba03e231/mirrorlist

# find /var -name mirrorlist -exec cat {} \;
http://mirror.centos.org/centos/8/AppStream/x86_64/os/
http://mirror.centos.org/centos/8/BaseOS/x86_64/os/
http://mirror.centos.org/centos/8/extras/x86_64/os/
http://mirror.centos.org/centos/8/AppStream/x86_64/os/
http://mirror.centos.org/centos/8/BaseOS/x86_64/os/
http://mirror.centos.org/centos/8/extras/x86_64/os/

On server:

# find /var -name mirrorlist 
/var/cache/PackageKit/8/metadata/AppStream-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/BaseOS-8-x86_64/mirrorlist
/var/cache/PackageKit/8/metadata/extras-8-x86_64/mirrorlist
/var/cache/dnf/appstream-773ef6463612e8e2/mirrorlist
/var/cache/dnf/baseos-055ffcb2ec25a27f/mirrorlist
/var/cache/dnf/extras-9705a089504ff150/mirrorlist

# find /var -name mirrorlist -exec cat {} \;
http://mirror.cc.columbia.edu/pub/linux/centos/8.2.2004/AppStream/x86_64/os/
http://repo.miserver.it.umich.edu/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.mojohost.com/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.genesisadaptive.com/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.san.fastserv.com/pub/linux/centos/8.2.2004/AppStream/x86_64/os/
http://mirrors.usinternet.com/centos/8.2.2004/AppStream/x86_64/os/
http://repos.lax.layerhost.com/centos/8.2.2004/AppStream/x86_64/os/
http://ewr.edge.kernel.org/centos/8.2.2004/AppStream/x86_64/os/
http://repo1.dal.innoscale.net/centos/8.2.2004/AppStream/x86_64/os/
http://mirrors.xtom.com/centos/8.2.2004/AppStream/x86_64/os/
http://mirror.nodesdirect.com/centos/8.2.2004/BaseOS/x86_64/os/
http://distro.ibiblio.org/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.linux.duke.edu/pub/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.mojohost.com/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.sfo12.us.leaseweb.net/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.sesp.northwestern.edu/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.trouble-free.net/centos/8.2.2004/BaseOS/x86_64/os/
http://ftp.osuosl.org/pub/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.web-ster.com/centos/8.2.2004/BaseOS/x86_64/os/
http://mirror.rackspace.com/CentOS/8.2.2004/BaseOS/x86_64/os/
http://mirror.ette.biz/centos/8.2.2004/extras/x86_64/os/
http://mirror.wdc1.us.leaseweb.net/centos/8.2.2004/extras/x86_64/os/
http://mirror.rackspace.com/CentOS/8.2.2004/extras/x86_64/os/
http://mirror.vcu.edu/pub/gnu_linux/centos/8.2.2004/extras/x86_64/os/
http://mirrors.raystedman.org/centos/8.2.2004/extras/x86_64/os/
http://ftp.osuosl.org/pub/centos/8.2.2004/extras/x86_64/os/
http://centos.mirror.constant.com/8.2.2004/extras/x86_64/os/
http://us.mirror.nsec.pt/centos/8.2.2004/extras/x86_64/os/
http://mirror.oss.ou.edu/centos/8.2.2004/extras/x86_64/os/
http://mirror.sesp.northwestern.edu/centos/8.2.2004/extras/x86_64/os/
http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/
http://mirror.centos.org/centos/8-stream/extras/x86_64/os/

So quite different...


Content of .repo files (only listing Centos ones, not epel):

/etc/yum.repos.d/CentOS-Stream-AppStream.repo:

# CentOS-Stream-AppStream.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.

[appstream]
name=CentOS Stream $releasever - AppStream
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-BaseOS.repo:

# CentOS-Stream-BaseOS.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.

[baseos]
name=CentOS Stream $releasever - BaseOS
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=BaseOS&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-Debuginfo.repo:

# CentOS-Stream-Debuginfo.repo
#
# All debug packages are merged into a single repo, split by basearch, and are
# not signed.

[debuginfo]
name=CentOS Stream $releasever - Debuginfo
baseurl=http://debuginfo.centos.org/$stream/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-Extras.repo:

# CentOS-Stream-Extras.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.

[extras]
name=CentOS Stream $releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/extras/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-HighAvailability.repo:

# CentOS-Stream-HighAvailability.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.

[ha]
name=CentOS Stream $releasever - HighAvailability
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=HighAvailability&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/HighAvailability/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-Media.repo:

# CentOS-Stream-Media.repo
#
# You can use this repo to install items directly off the installation media.
# Verify your mount point matches one of the below file:// paths.

[media-baseos]
name=CentOS Stream $releasever - Media - BaseOS
baseurl=file:///media/CentOS/BaseOS
        file:///media/cdrom/BaseOS
        file:///media/cdrecorder/BaseOS
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[media-appstream]
name=CentOS Stream $releasever - Media - AppStream
baseurl=file:///media/CentOS/AppStream
        file:///media/cdrom/AppStream
        file:///media/cdrecorder/AppStream
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-Plus.repo:

# CentOS-Stream-Plus.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.

[plus]
name=CentOS Stream $releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-PowerTools.repo:

# CentOS-Stream-PowerTools.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.

[powertools]
name=CentOS Stream $releasever - PowerTools
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=PowerTools&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------

/etc/yum.repos.d/CentOS-Stream-RealTime.repo:

# CentOS-Stream-RealTime.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are 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, you can try the commented out
# baseurl line instead.

[rt]
name=CentOS Stream $releasever - RealTime
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=RT&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/RT/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

-----------------------------------------------------
12
  • I may be wrong, but that looks fine. I think the repo in CentOS 8.0 was called that at the time. What happens when you try to update the server? Do you get any error messages? If so, add them to your question as well as the contents of /var/log/dnf.log. Nov 29, 2020 at 21:33
  • I also tried 'dnf clean all' to clean out the caches, made no difference.
    – Philip
    Nov 29, 2020 at 21:47
  • Are you sure that you are actually running CentOS 8.0? If so, there should definitely be updates as you are two minor releases behind. Add the output of cat /etc/*-release and grep -rH enabled=1 /etc/yum.repos.d/* to the question. Nov 29, 2020 at 22:45
  • See the additions - it all looks ok to me -- but then that is why I am asking here :-)
    – Philip
    Nov 30, 2020 at 0:16
  • Looking at the difference when compared to my Centos 8 VM, I think the server is using the wrong repos. So I suppose the question is how to remove the current ones and replace them with the correct repos???
    – Philip
    Nov 30, 2020 at 0:21

3 Answers 3

2

From RHEL 8 documentation:

RHEL 8 content is distributed through the two main repositories: BaseOS and AppStream.

BaseOS Content in the BaseOS repository is intended to provide the core set of the underlying OS functionality that provides the foundation for all installations. This content is available in the RPM format and is subject to support terms similar to those in previous releases of Red Hat Enterprise Linux.

AppStream Content in the AppStream repository includes additional user-space applications, runtime languages, and databases in support of the varied workloads and use cases. Content in AppStream is available in one of two formats - the familiar RPM format and an extension to the RPM format called modules.

See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/installing_managing_and_removing_user-space_components/using-appstream_using-appstream for full details.

1
  • 1
    That doesn't really help. I saw it some time ago. If you look at the two different repo configs, both have a BaseOS and AppsStream - but they are different. One seems to work, and the other doesn't. The real question is how to reset the repo configs and install/configure one that actually works.
    – Philip
    Nov 30, 2020 at 15:47
2

A quick solution is to append $releasever with -stream for every repo, that fails to get mirrorlist, e.g.:

mirrorlist.centos.org/?release=$releasever-stream ...

Like so,

[BaseOS]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever-stream&arch=$basearch&repo=BaseOS&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
1
  • 1
    sed -i 's/releasever/releasever-stream/g' /etc/yum.repos.d/CentosOS*
    – BBQ
    Apr 6, 2022 at 20:40
1

Your server is running "Centos 8 Stream". Your VM is running traditional "Centos 8".

What is the difference you ask? Centos has traditionally been downstream of RHEL, resulting in a stable, production capable OS. This flow has limited the ability of other developers to contribute code that would benefit the RHEL product. By moving CentOS upstream of RHEL, Red Hat can more easily allow those contributions, which will flow down and ultimately benefit RHEL. CentOS Stream is now placed between Fedora and RHEL, and support will soon end for the traditional CentOS product.

From Wikipedia:

In December 2020, Red Hat and the CentOS Board announced that CentOS Linux development would end at the end of 2021. The CentOS Project will, however, continue to produce the related continuously delivered distro, CentOS Stream.

End of life dates:

All updates to CentOS 8 will end on December 31st, 2021. However, CentOS 7 will continue to receive maintenance updates until June 30th, 2024.

https://wiki.centos.org/About/Product

Projects are underway to create alternate downstream distros (e.g. Rocky Linux - https://rockylinux.org/) for use in production environments. Until they are complete however, you only have a few options:

  1. Use CentOS Stream
  2. Migrate to a different distro
  3. Red Hat are now offering a certain number of instances (8 perhaps?) of RHEL for free via a 'no-cost Red Hat Developer subscription'. (https://developers.redhat.com/articles/faqs-no-cost-red-hat-enterprise-linux)

This may work for some users, but i believe many are hanging on for Rocky Linux in the hope it will be a drop-in replacement for traditional CentOS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .