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 -----------------------------------------------------
/var/log/dnf.log.cat /etc/*-releaseandgrep -rH enabled=1 /etc/yum.repos.d/*to the question.