Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 8 migration fails after EOL with error: Cannot prepare internal mirrorlist: No URLs in mirrorlist #128

Open
dskfh opened this issue Feb 13, 2022 · 1 comment

Comments

@dskfh
Copy link

dskfh commented Feb 13, 2022

Now that CentOS 8 is history, using centos2ol.sh does not work any more because the CentOS repositories have become unavailable.

Running the script produces something like this:

Checking for required packages...
Checking your distribution...
epel-release-8-13.el8.noarch
Checking for yum lock...
Checking for required python packages...
Identifying dnf modules that are enabled
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Finding your repository directory...
Learning which repositories are enabled...
Repositories enabled before update include:
appstream
baseos
extras
elrepo
epel
epel-modular
ol8_baseos_latest
ol8_appstream
ol8_UEKR6
Looking for yumdownloader...
CentOS Linux 8 - AppStream                                                                                                           1.3 kB/s |  38  B     00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
'yumdownloader' command not found. Please install or add it to your PATH and try again.
For assistance, please open an issue via GitHub: https://github.com/oracle/centos2ol/.

Right now, I am updating files in /etc/yum.repos.d/, replacing mirrorlist=... with this:

baseurl=http:https://vault.centos.org/$contentdir/$releasever/[Appstream|...]/$basearch/os/

What is the recommended migration path now, and will centos2ol.sh be updated to handle this automatically?

@ehb54
Copy link

ehb54 commented Feb 13, 2022

There is a note about this in the README
When I ran into this issue, I updated as you did for all repos, extrapolated from shaneholloman's currently last comment in #126 :

BTW, since centos8 repos have move to vault I also

Change to following line to each respective file:

[root@etp-monitor1 ansible]# vi /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
[root@etp-monitor1 ansible]# vi /etc/yum.repos.d/CentOS-Linux-AppStream.repo

CentOS-Linux-BaseOS.repo
baseurl=http:https://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
CentOS-Linux-AppStream.repo
baseurl=http:https://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/

Comment the mirrors

Agree it would be nice if someone could update the scripts to handle this automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants