Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#7 - "Failed to connect to 2a0

jhadea1

New Member
Joined
Jul 12, 2023
Messages
6
Reaction score
0
Credits
71
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 - "Failed to connect to 2a05:d012:8b5:6503:9efb:5cad:348f:e826: Network is unreachable"


One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64



hi guys can anyone help me with this ?
 


You can try hard coding the repo URL in your repo file.

Code:
http://mirror.clarkson.edu/centos/7.9.2009/os/x86_64/
http://mirror.steadfastnet.com/centos/7.9.2009/os/x86_64/
http://centos.mirror.constant.com/7.9.2009/os/x86_64/
http://mirror.fcix.net/centos/7.9.2009/os/x86_64/
http://abqix.mm.fcix.net/centos/7.9.2009/os/x86_64/
http://uvermont.mm.fcix.net/centos/7.9.2009/os/x86_64/
http://ohioix.mm.fcix.net/centos/7.9.2009/os/x86_64/
http://coresite.mm.fcix.net/centos/7.9.2009/os/x86_64/
http://mirrors.xmission.com/centos/7.9.2009/os/x86_64/
http://mirrors.advancedhosters.com/centos/7.9.2009/os/x86_64/

/etc/yum.repos.d/centos7.repo

after that, try clearing the yum cache.

yum clean all
 
No, only one line, I don't use CentOS anymore, and 7 is pretty old.

Can you paste your repo file here, and I can make the fixes.

You only need one of the lines above.
 
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
 
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

Comment out all of the lines that say mirrorlist=
Uncomment the lines that say #baseurl=

Change all the baseurl lines to

baseurl=http://mirrors.xmission.com/centos/7.9.2009/os/x86_64/

...or whichever mirror is closest to you.

then run

yum clean all
 
Welcome to the forums

Heads up, CentOS 7 reaches the end of life next year on the 30th June, time to think about an alternative
 
Heads up, CentOS 7 reaches the end of life next year on the 30th June, time to think about an alternative

It definitely needs to be retired, but I think support just got extended yesterday.


Originally RHEL 7 was set to reach the end of its supported life at the end of June 2024, however the deadline has been extended by four years to 2028
 
Last edited:
Top