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

Issues related to applications and software problems
sharingan
Posts: 21
Joined: 2019/04/26 12:44:13

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

Post by sharingan » 2019/04/26 20:41:13

Hi all,
I am getting the same issue and please found kernel release
Please help me to resolve this issue.

[root@localhost ~]# rpm -qa '*release'
centos-release-7-6.1810.2.el7.centos.x86_64
[root@localhost ~]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php? ... tegory=yum
distroverpkg=centos-release


# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2019/04/29 16:40:04

I've split your post away from the thread you posted to as that had a rather specific cause - the centos-release package was missing entirely.

What is the problem that you have? Give exact error messages.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

sharingan
Posts: 21
Joined: 2019/04/26 12:44:13

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

Post by sharingan » 2019/05/01 11:17:36

I have tired to update yum but getting the following errors ,

[root@localhost ~]# yum -y update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
14: curl#7 - "Failed to connect to 2604:1580:fe02:2::10: 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

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2019/05/01 11:55:40

Your network is broken. It's tried to connect over ipv4 and failed and then it retries using ipv6 and that failed too. Fix your network so that you can e.g. run curl -4 "http://mirrorlist.centos.org/?release=7 ... nfra=stock" and not get an error.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

sharingan
Posts: 21
Joined: 2019/04/26 12:44:13

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

Post by sharingan » 2019/05/02 05:57:49

Hi TrevorH,

I am able to ping google and other sites,

[root@localhost ~]# ping google.com
PING google.com (172.217.163.174) 56(84) bytes of data.
64 bytes from maa05s05-in-f14.1e100.net (172.217.163.174): icmp_seq=1 ttl=51 tim e=93.8 ms
64 bytes from maa05s05-in-f14.1e100.net (172.217.163.174): icmp_seq=2 ttl=51 tim e=77.4 ms
64 bytes from maa05s05-in-f14.1e100.net (172.217.163.174): icmp_seq=3 ttl=51 tim e=90.5 ms
64 bytes from maa05s05-in-f14.1e100.net (172.217.163.174): icmp_seq=4 ttl=51 tim e=86.5 ms
64 bytes from maa05s05-in-f14.1e100.net (172.217.163.174): icmp_seq=5 ttl=51 time=84.7 ms

So can you please tell where should i look for the issue ?

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2019/05/02 08:53:08

Just because you can ping something does not mean that you can access it via other protocols. Use the command I gave you to test:

curl -4 "http://mirrorlist.centos.org/?release=7 ... nfra=stock"
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

sharingan
Posts: 21
Joined: 2019/04/26 12:44:13

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

Post by sharingan » 2019/05/02 18:43:47

i have tried to run the command but found the below response
[root@localhost ~]# curl -4 "http://mirrorlist.centos.org/?release=7 ... nfra=st ock"
curl: (7) Failed connect to mirrorlist.centos.org:80; Operation now in progress
[root@localhost ~]#

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2019/05/03 01:00:56

I suspect you are behind a web proxy. Use man yum.conf to get teh doc up, search it for proxy, add the necessary bits to /etc/yum.conf, try again.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

sharingan
Posts: 21
Joined: 2019/04/26 12:44:13

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

Post by sharingan » 2019/05/07 10:58:10

Hi TrevorH,

Sorry for the late reply mate.

I am very new to this environment , please tell what i need to change in yum.conf ? do i need to install libproxy and how it will works.

I found the below in man yum.conf please guide me to resolve the issue.

proxy URL to the proxy server that yum should use. Set this to
`libproxy' to enable proxy auto configuration via libproxy.
Defaults to direct connection.

proxy_username username to use for proxy

proxy_password password for this proxy

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2019/05/07 15:19:17

You need to add proxy= and proxy_username=/proxy_password= if your proxy needs a username/password. No idea what libproxy is but yum doesn't need it, the functionality is built in.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”