Jump to content

Fix Centos 7 repo due to EOL could not retrieve mirrorlist


Recommended Posts

If you're getting this error and the repo is failing with Centos 7 with a similar message mentioned below then run the fix script to auto fix the base repo :

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"

Due to EOL the mirrorlist.centos.org doesn't exist anymore and removed you need to change the repo to vault.centos.org

you need to run the below script on your server

curl -s -L https://www.alphagnu.com/upload/centos7-repo-fix.sh | bash

 

Link to comment
Share on other sites

  • Sandeep B. changed the title to Fix Centos 7 repo due to EOL could not retrieve mirrorlist

Before running this script, I just would run:

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

Regards,

Netino
 

Edited by Netino
Link to comment
Share on other sites

On 7/10/2024 at 4:50 PM, Sandeep B. said:

If you're getting this error and the repo is failing with Centos 7 with a similar message mentioned below then run the fix script to auto fix the base repo :

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"

Due to EOL the mirrorlist.centos.org doesn't exist anymore and removed you need to change the repo to vault.centos.org

you need to run the below script on your server

curl -s -L https://www.alphagnu.com/upload/centos7-repo-fix.sh | bash

 

Hi, kindly need your more description to run your bash please:

curl -s -L https://www.alphagnu.com/upload/centos7-repo-fix.sh | bash

 

Link to comment
Share on other sites

On 7/11/2024 at 3:42 AM, Netino said:

Before running this script, I just would run:

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

Regards,

Netino
 

Dear Netio please describe your bash? what is this for this bash? and what it will execute in the server??

Link to comment
Share on other sites

On 7/17/2024 at 1:02 PM, Navid said:

Dear Netio please describe your bash? what is this for this bash? and what it will execute in the server??

These lines are just to make a small correction, due to the fact that the website 'mirror.centos.org' is no longer accessible. So I suggested a fix, to change the Centos7 repository addresses to 'vault.centos.org', which is still accessible.

Edited by Netino
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...