CentOS 8: Failed to download metadata for repo 'appstream'

Issues related to applications and software problems and general support
avoulvou
Posts: 5
Joined: 2022/01/31 20:24:35

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by avoulvou » 2022/02/01 17:35:04

Hi

Not working without changing url

I am trying to update/convert a test server and following your guide receive bellow errors :
oot@srv1 ~]# dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
CentOS Linux 8 - Extras 40 kB/s | 1.5 kB 00:00
CentOS Linux 8 - Extras 254 kB/s | 10 kB 00:00
Modular dependency problems:

Problem 1: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8030020200716150652:1e4bbb35-0.x86_64
Problem 2: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-IO-Socket-SSL:2.066:8030020201222215140:1e4bbb35-0.x86_64
Problem 3: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-libwww-perl:6.34:8030020201223164340:b967a9a2-0.x86_64
Error:
Problem 1: conflicting requests
- nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
Problem 2: package centos-linux-release-8.4-1.2105.el8.noarch requires centos-repos(8), but none of the providers can be installed
- conflicting requests
- problem with installed package centos-linux-release-8.4-1.2105.el8.noarch
- nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

My Version :
[@srv1 ~]$ cat /etc/centos-release
CentOS Linux release 8.4.2105
[@srv1 ~]$ uname -a
Linux srv1.etd.com.gr 4.18.0-305.3.1.el8.x86_64 #1 SMP Tue Jun 1 16:14:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[@srv1 ~]$
I missed something ?

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by TrevorH » 2022/02/01 17:48:06

@srv1 ~]$ uname -a
Linux srv1.etd.com.gr 4.18.0-305.3.1.el8.x86_64 #1 SMP Tue Jun 1 16:14:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[@srv1 ~]$
I missed something ?
By the looks of that kernel version, about a year's worth of updates.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

avoulvou
Posts: 5
Joined: 2022/01/31 20:24:35

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by avoulvou » 2022/02/01 18:17:15

That I am trying to do :)
For that reason I Am saying it doesnt work your suggestion, at least for my case :lol:

User avatar
rapideyeconsulting
Posts: 2
Joined: 2022/02/03 00:12:36
Contact:

My Solution - Works on 3 CentOS instances

Post by rapideyeconsulting » 2022/02/03 00:18:40

Hello Everyone,

I posted a solution to this on my blog, but I also would like to post this here for all of you to try.

CentOS 8 EOL - Package Updates from CentOS 8 Stream

I was unaware of the CentOS 8 End-Of-Life or EOL until after noticing that I could not update my systems. After viewing the content from this thread, I wanted to post my solution. I applied this fix on 3 CentOS installation without issues. 2 hosts were virtual machines and the last one was the CentOS 8 hypervisor powering the two CentOS 8 VMs. In my situation, I was unable to download the latest centos-gpg-keys, so the fix was to change the gpgcheck parameter to 0 to disable the gpg key validation to force the update.


I edited the following three files /etc/yum.repos.d:
1) CentOS-Linux-AppStream.repo
2) CentOS-Linux-BaseOS.repo
3) CentOS-Linux-ContinuousRelease.repo


Use an editor to open each of the 3 aforementioned files, but one at a time:

1st file) vi /etc/yum/repos.d/CentOS-Linux-AppStream.repo

1) Uncomment baseurl= by removing hash symbol.
2) Change the hosts from mirrorlist= from mirrorlist.centos.org to vault.centos.org
3) Change the hosts from baseurl= from mirror.centos.org to vault.centos.org
4) Change gpgcheck=1 to gpgcheck=0

Do the same for CentOS-Linux-BaseOS.repo and CentOS-Linux-ContinuousRelease.repo

--------------------------------------------------------------------------------------
Example with removed comments:
CentOS-Linux-AppStream.repo ( Old )

[appstream]
name=CentOS Linux $releasever - AppStream
mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$r ... search/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

CentOS-Linux-AppStream.repo ( Edited )

[appstream]
name=CentOS Linux $releasever - AppStream
mirrorlist=http://vault.centos.org/?release=$relea ... fra=$infra
baseurl=http://vault.centos.org/$contentdir/$re ... search/os/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
-----------------------------------------------------------------------------------------
Package Manager / dnf commands:
1) dnf clean all
2) dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos ( you may need to run this twice - due to dnf auto-aborting )
3) dnf clean all
4) dnf distro-sync

5) reboot (Optional, though, recommended to test the boot process)

Also, be sure to test any of your enabled services to ensure that they can be restarted and operational with systemctl without conflict.

Post-reboot

After boot, navigate to or list directory contents of /etc/yum.repos.d/

You'll may notice that new CentOS8 repo files have been added automatically, and old one renamed and suffixed with .rpmnew

1) cd /etc/yum/yum.repos.d
2) ls

Note the new .repo files prefixed with 'CentOS-Stream':

[user@rc1 yum.repos.d]$ ls
CentOS-Linux-AppStream.repo.rpmsave CentOS-Stream-PowerTools.repo
CentOS-Linux-BaseOS.repo.rpmsave CentOS-Stream-RealTime.repo
CentOS-Linux-ContinuousRelease.repo.rpmsave CentOS-Stream-ResilientStorage.repo
CentOS-Stream-AppStream.repo CentOS-Stream-Sources.repo
CentOS-Stream-BaseOS.repo epel-modular.repo
CentOS-Stream-Debuginfo.repo epel-playground.repo
CentOS-Stream-Extras.repo epel.repo
CentOS-Stream-HighAvailability.repo epel-testing-modular.repo
CentOS-Stream-Media.repo epel-testing.repo
CentOS-Stream-NFV.repo


The job might not be completely fixed or it may have, so please use at your own risk, though, my systems are completely OK and up to date after doing these steps.
Last edited by rapideyeconsulting on 2022/02/03 23:18:46, edited 3 times in total.

Abdelhamidbensadoun
Posts: 1
Joined: 2022/02/02 23:56:41

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by Abdelhamidbensadoun » 2022/02/03 02:25:03

TrevorH wrote:
2022/01/31 20:37:35
The correct and easy way to migrate from CentOS Linux 8 to CentOS Stream 8 is to run:

Code: Select all

dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
[Edited with the v2 version of how to...]
Thank you so much

martian0007
Posts: 2
Joined: 2021/06/30 01:32:56

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by martian0007 » 2022/02/03 03:33:15

just run these....problem solved !


sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by TrevorH » 2022/02/03 09:27:13

just run these....problem solved !


sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
No. Problem NOT solved. That just switches the repos to vault.centos.org but CentOS 8 is dead and will not receive any more updates. Your solution does not handle that.

You need to switch to a different distro, not just point to vault which is already stale and out of date.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

soulreaver1
Posts: 8
Joined: 2012/03/31 14:54:39

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by soulreaver1 » 2022/02/03 11:30:48

TrevorH wrote:
2022/01/31 20:37:35
The correct and easy way to migrate from CentOS Linux 8 to CentOS Stream 8 is to run:

Code: Select all

dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
[Edited with the v2 version of how to...]

Is there anything can be done if there is no current centos-gpg-keys in the system?

Code: Select all

dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - Extras                         5.2 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - Extras                          40 kB/s |  10 kB     00:00    
Error: 
 Problem 1: conflicting requests
  - nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
 Problem 2: package centos-linux-release-8.3-1.2011.el8.noarch requires centos-repos(8), but none of the providers can be installed
  - conflicting requests
  - problem with installed package centos-linux-release-8.3-1.2011.el8.noarch
  - nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by TrevorH » 2022/02/03 12:17:05

Download the newer gpg-keys package from vault and install it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
rapideyeconsulting
Posts: 2
Joined: 2022/02/03 00:12:36
Contact:

Re: CentOS 8: Failed to download metadata for repo 'appstream'

Post by rapideyeconsulting » 2022/02/03 23:04:03

soulreaver1 wrote:
2022/02/03 11:30:48
TrevorH wrote:
2022/01/31 20:37:35
The correct and easy way to migrate from CentOS Linux 8 to CentOS Stream 8 is to run:

Code: Select all

dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
[Edited with the v2 version of how to...]

Is there anything can be done if there is no current centos-gpg-keys in the system?

Code: Select all

dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - Extras                         5.2 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - Extras                          40 kB/s |  10 kB     00:00    
Error: 
 Problem 1: conflicting requests
  - nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
 Problem 2: package centos-linux-release-8.3-1.2011.el8.noarch requires centos-repos(8), but none of the providers can be installed
  - conflicting requests
  - problem with installed package centos-linux-release-8.3-1.2011.el8.noarch
  - nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
You have to skip the gpg key check by making gpgcheck=0 in the .repo files. That's how I got my systems converted to CentOS 8 Stream...Check my previous post, a couple of spots above

Post Reply