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

Issues related to applications and software problems and general support
jobe
Posts: 2
Joined: 2020/10/26 10:55:07

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

Post by jobe » 2022/01/31 10:34:45

Hi everybody, on my CentOS 8 server (CentOS Linux release 8.5.2111) today I used "dnf update" command, but I received this error:

Code: Select all

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
The server is connected to the internet and can download files.
Since CentOS 8 is EOL, have they changed or removed CentOS 8 repos? I did not find any confirmation on centos site. Do you have any clue?

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/01/31 11:19:38

CentOS 8 went EOL at the end of December and in line with all the public announcements, the content of the CentOS 8 repos has been moved to vault.centos.org.

It's time to move to something else.
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

jobe
Posts: 2
Joined: 2020/10/26 10:55:07

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

Post by jobe » 2022/01/31 12:02:10

Thanks for the clarification. Yes, I am migrating to Rocky ;)

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

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

Post by avoulvou » 2022/01/31 20:29:43

Hi,

In order to convert from archived vault Centos 8 the procedure is
Under /etc/yum.repo.d
Change urls from Centos to vault.
Example :
name=CentOS Linux $releasever - BaseOS
#mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
mirrorlist=http://vault.centos.org/?release=$relea ... fra=$infra
baseurl=http://vault.centos.org/$contentdir/$re ... search/os/

dnf clean all
dnf swap centos-linux-repos centos-stream-repos ( This will produce erros , so repeat this command twice)
dnf update
reboot


Let me know if you suggest other way

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/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...]
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

Egyas
Posts: 1
Joined: 2022/01/31 22:26:03

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

Post by Egyas » 2022/01/31 22:28:18

avoulvou wrote:
2022/01/31 20:29:43
Hi,

In order to convert from archived vault Centos 8 the procedure is
Under /etc/yum.repo.d
Change urls from Centos to vault.
Example :
name=CentOS Linux $releasever - BaseOS
#mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
mirrorlist=http://vault.centos.org/?release=$relea ... fra=$infra
baseurl=http://vault.centos.org/$contentdir/$re ... search/os/

dnf clean all
dnf swap centos-linux-repos centos-stream-repos ( This will produce erros , so repeat this command twice)
dnf update
reboot


Let me know if you suggest other way
I created an account here JUST so that I could say "THANK YOU!" for this post. :)

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

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

Post by jlehtone » 2022/01/31 22:40:11

If Stream feels like a too distant cousin, the "siblings" (RHEL, Alma, Rocky, OL) surely have "sidegrade" scripts.

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/01/31 23:00:50

I created an account here JUST so that I could say "THANK YOU!" for this post. :)
Even though it's the wrong solution?
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 16:45:35

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...]
Hi,

you have missed the most important the links dont work any more
So the initial step is
Change url to vault
Else you will have
[root@srv1 ~]# dnf update
CentOS Linux 8 - AppStream 271 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
[root@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)

and will crash if you try to continue
after that you can proceed with one option or another

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 16:47:16

No, you didn't read the command. It disables ALL repos then enables ONLY the extras repo which is the only CentOS Linux 8 repo still working. There is no need to change the baseurls to vault since it disables all the repos.

You do need the system to be up to date enough to have the latets centos-gog-keys package installed.
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

Post Reply