CentOS 8: Failed to download metadata for repo 'appstream'
- adm-carzaffo
- Posts: 5
- Joined: 2020/08/30 16:49:30
Re: CentOS 8: Failed to download metadata for repo 'appstream'
CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. It means that CentOS 8 will no longer receive development resources from the official CentOS project. After Dec 31st, 2021, if you need to update your CentOS, you need to change the mirrors to vault.centos.org where they will be archived permanently.
Step 1: Go to the /etc/yum.repos.d/ directory.
Step 2: Run the below commands
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-*
Step 3: To clean all cached information, use the following command
yum clean all
Step 4: Now run the yum update
yum update -y
Step 1: Go to the /etc/yum.repos.d/ directory.
Step 2: Run the below commands
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-*
Step 3: To clean all cached information, use the following command
yum clean all
Step 4: Now run the yum update
yum update -y
Thank you!
adm-carzaffo
adm-carzaffo
Re: CentOS 8: Failed to download metadata for repo 'appstream'
All that does is get you up to date until the end of 2021 and now you are stuck. You need to do more than change repos to vault, you need to change distros.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: CentOS 8: Failed to download metadata for repo 'appstream'
I've built LFS, twice. Let me tell you the difference in complexity and difficulty is several orders of magnitude more to do LFS than to build packages from SRPMs using mock.KernelDeimos wrote: ↑2022/02/05 03:04:00I would rather build LFS than understand what that sentence means.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
-
- Posts: 5
- Joined: 2022/02/05 01:37:55
Re: CentOS 8: Failed to download metadata for repo 'appstream'
I'm in the middle of an LFS build right now actuallyTrevorH wrote: ↑2022/02/05 12:44:00I've built LFS, twice. Let me tell you the difference in complexity and difficulty is several orders of magnitude more to do LFS than to build packages from SRPMs using mock.KernelDeimos wrote: ↑2022/02/05 03:04:00I would rather build LFS than understand what that sentence means.

Re: CentOS 8: Failed to download metadata for repo 'appstream'
No, I mean that a plain rebuild of Fedora packages from their SRPMs will be a lot quicker (usually) and produce better results than either bodging it by installing foreign packages intended for a different distro or by compiling them all from source without packaging it at all.
You install mock from EPEL, add your user to the mock group then just run mock --rebuild /path/to/your-fedora.src.rpm. If it complains about missing prereqs then you either have to build those prereqs first and add them to your own yum repo or you have to work out how to disable whatever feature it is that requires those prereqs so you can build without them.
You install mock from EPEL, add your user to the mock group then just run mock --rebuild /path/to/your-fedora.src.rpm. If it complains about missing prereqs then you either have to build those prereqs first and add them to your own yum repo or you have to work out how to disable whatever feature it is that requires those prereqs so you can build without them.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: CentOS 8: Failed to download metadata for repo 'appstream'
I joined just to say THANK YOU. This solution worked flawlessly for me. Thank you for your knowledge.TrevorH wrote: ↑2022/01/31 20:37:35The correct and easy way to migrate from CentOS Linux 8 to CentOS Stream 8 is to run:[Edited with the v2 version of how to...]Code: Select all
dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos dnf distro-sync

Regards.
Re: CentOS 8: Failed to download metadata for repo 'appstream'
I'd hope that this thread and guidance would get higher in the search engine ranking. For example in Google this solution is not unfortunately on the top rank links. Instead there are a couple of years old instructionsTrevorH wrote: ↑2022/01/31 20:37:35The correct and easy way to migrate from CentOS Linux 8 to CentOS Stream 8 is to run:[Edited with the v2 version of how to...]Code: Select all
dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos dnf distro-sync

Thanks TrevorH!
Re: CentOS 8: Failed to download metadata for repo 'appstream'
I don't know if this is typical or not, but vault.centos.org was so slow that dnf kept timing out, even when I set `minrate=10` and `timeout=3600`. I tried to install the gpg key using `dnf --disablerepo=* install https://vault.centos.org/../gpgkey`, as was suggested in another comment. I also downloaded the rpm and tried a local install, but it always failed with the same gpg key error.
I found these steps work to resolve the gpg key errors:
I assume you can do steps 6-8 before step 5 without any issues, but I didn't do it that way, so I'm only reporting the steps in the order in which I performed them.
I found these steps work to resolve the gpg key errors:
Code: Select all
1. dnf install centos-release-stream -y --disablerepo=* --enablerepo='extras'
-- This downloads the Stream repo files.
2. dnf swap centos-{linux,stream}-repos -y --disablerepo=* --enablerepo=extras,Stream-*
-- Enabling Stream-* allows you to download the latest gpg key
3. dnf config-manager --set-enabled powertools
-- Only necessary if you're using epel repos
4. dnf distro-sync -y
5. reboot
6. dnf upgrade -y
-- Not all packages are upgradeable during the distro-sync. I had 28 packages on one server, including gcc-c++, gcc-fortran, and mysql-server
7. rm -f /etc/yum.repos.d/*rpmsave
-- Optional. There's no need to keep these files, but if you don't mind your directory being messy, you can leave them.
8. ls *rpmnew | awk -F '.' '{ print $1 }' | while read -r REPO ; do /usr/bin/cp $REPO.repo.rpmnew $REPO.repo ; done
-- Optional. The *.repo.rpmnew files have $releasever in the Name directive, so this is just to keep the display names consistent across repos and servers (if you build new Stream systems, they'll have $releasever in the display name); the actual repo names are the same in both files.
Re: CentOS 8: Failed to download metadata for repo 'appstream'
The easiest way to get around the gpg-keys package error is just to install a new enough package.
This worked for me:
This worked for me:
Code: Select all
curl https://vault.centos.org/8.5.2111/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-3.el8.noarch.rpm -o centos-gpg-keys-8-3.el8.noarch.rpm
rpm -i centos-gpg-keys-8-3.el8.noarch.rpm
dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
-
- Posts: 73
- Joined: 2019/08/09 20:54:52
Re: CentOS 8: Failed to download metadata for repo 'appstream'
Hi guys
and i have this isuue for centos 8
but the soulreaver1 commands fix for me
and working fine and install almalinux
thanks soulreaver1
and i have this isuue for centos 8
but the soulreaver1 commands fix for me
and working fine and install almalinux
thanks soulreaver1