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

Issues related to applications and software problems
jzmendo
Posts: 10
Joined: 2021/08/13 01:38:58

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

Post by jzmendo » 2021/08/13 01:51:11

Hi. Everybody

I have a problema when i try to install any package or update my system.

My system is Centos 7.7

# cat os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

This are the repos files i have creted.

# ls -latr
total 52
-rw-r--r--. 1 root root 6639 Sep 5 2019 CentOS-Vault.repo
-rw-r--r--. 1 root root 1331 Sep 5 2019 CentOS-Sources.repo
-rw-r--r--. 1 root root 630 Sep 5 2019 CentOS-Media.repo
-rw-r--r--. 1 root root 314 Sep 5 2019 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 649 Sep 5 2019 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 1309 Sep 5 2019 CentOS-CR.repo
-rw-r--r-- 1 root root 998 Aug 9 19:03 CentOS-SCLo-scl.repo
-rw-r--r-- 1 root root 1744 Aug 9 19:04 centreon.repo
drwxr-xr-x. 85 root root 8192 Aug 12 14:07 ..
-rw-r--r-- 1 root root 1653 Aug 12 20:16 CentOS-Base.repo
drwxr-xr-x. 2 root root 236 Aug 12 20:16 .
[root@mexmtycentreon yum.repos.d]#

And this is the output of repos base

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $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=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $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=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $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=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[root@mexmtycentreon yum.repos.d]#


# yum update
Loaded plugins: fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7 ... nfra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')


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

I hope somebody can help me with this problem i have 4 days working with this and cannot find the solution.

Regards.

Francisco.

User avatar
TrevorH
Site Admin
Posts: 33215
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 » 2021/08/13 09:34:29

My system is Centos 7.7
So you need to address that urgently as 7.7 is more than 2 years out of date but you cannot do that until you can fix the current problem.

Is this system behind a web proxy? That's the usual cause of that sort of error, a badly configured or performing proxy sitting between you and the internet and stopping traffic from flowing. You could also try editing /etc/yum/pluginconf.d/fastestmirror.conf and setting "enabled=0" so that the useless plugin gets out of the way.
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

jzmendo
Posts: 10
Joined: 2021/08/13 01:38:58

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

Post by jzmendo » 2021/08/13 14:11:09

Hi Trevorth Thanks for your answer.

I apply your recomendation but still have the problem.

I changed the variable enabled the value 1 to 0 and try to update with yum and send me the same error.

Let me tell you something i installed another centos 7.7 in my laptop with virtualbox just to use it to make tests
and this distro 7.7 let me update i run yum updat ans let me update.

So with this test, i think i must update the system too under 7.7 may be is a problem with yum or ntwork i dont know

]# cat fastestmirror.conf
[main]
enabled=0
verbose=0
always_print_best_host = true
socket_timeout=3
# Relative paths are relative to the cachedir (and so works for users as well
# as root).
hostfilepath=timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook
#include_only=.nl,.de,.uk,.ie

# yum update
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7 ... nfra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')


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
:shock: :? :o :)

jzmendo
Posts: 10
Joined: 2021/08/13 01:38:58

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

Post by jzmendo » 2021/08/13 14:19:11

This is the output of yum repolist.

# yum repolist
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7 ... nfra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7 ... nfra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7 ... nfra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7 ... nfra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
repo id repo name status
base/7/x86_64 CentOS-7 - Base 0
centosplus/7/x86_64 CentOS-7 - Plus 0
extras/7/x86_64 CentOS-7 - Extras 0
updates/7/x86_64 CentOS-7 - Updates 0
repolist: 0

User avatar
TrevorH
Site Admin
Posts: 33215
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 » 2021/08/13 14:42:20

What do you see if you run curl directly like curl "http://mirrorlist.centos.org/?release=7 ... nfra=stock" (quotes required round the url).
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


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

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

Post by jlehtone » 2021/08/14 09:17:09

jzmendo wrote:
2021/08/13 01:51:11
This are the repos files i have creted.
You created? All but one look like content from CentOS packages.

You can get mirrorlist with curl. This is what I would try:

Code: Select all

$ sudo yum install http://ftp.osuosl.org/pub/centos/7.9.2009/updates/x86_64/Packages/centos-release-7-9.2009.1.el7.centos.x86_64.rpm
$ sudo yum --enablerepo=* clean all
$ sudo yum repolist
There are two points of interest:
1. Does the yum install create "*.rpmnew" files in /etc/yum.repos.d? If it does, then you have to replace your versions with those.
2. What does the repolist show?

jzmendo
Posts: 10
Joined: 2021/08/13 01:38:58

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

Post by jzmendo » 2021/08/16 15:44:51

Hi jlehtone.

Thank you very much for your answer.

My system has a Centos 7.7 i think this version is out of date.

# cat centos-release
CentOS Linux release 7.7.1908 (Core)

# cat os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

The list of repos what i have are this.
(All this repos are the originals repos i dont created any manually)

# pwd
/etc/yum.repos.d

# ls -latr
total 52
-rw-r--r--. 1 root root 1331 Sep 5 2019 CentOS-Sources.repo
-rw-r--r--. 1 root root 630 Sep 5 2019 CentOS-Media.repo
-rw-r--r--. 1 root root 314 Sep 5 2019 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 649 Sep 5 2019 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 1309 Sep 5 2019 CentOS-CR.repo
-rw-r--r-- 1 root root 998 Aug 9 19:03 CentOS-SCLo-scl.repo
-rw-r--r-- 1 root root 1744 Aug 9 19:04 centreon.repo
drwxr-xr-x. 85 root root 8192 Aug 13 08:48 ..
-rw-r--r-- 1 root root 6639 Aug 13 12:01 CentOS-Vault.repo
-rw-r--r-- 1 root root 1663 Aug 13 12:09 CentOS-Base.repo
drwxr-xr-x. 2 root root 236 Aug 13 12:09 .

This is the output of CentOS-Base.repo

# cat CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $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=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $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=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $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=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

This is the output of #yum repolist

# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7 ... nfra=stock error was
12: Timeout on http://mirrorlist.centos.org/?release=7 ... nfra=stock: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
repo id repo name status
base/7/x86_64 CentOS-7 - Base 0
extras/7/x86_64 CentOS-7 - Extras 0
updates/7/x86_64 CentOS-7 - Updates 0
repolist: 0


If you need more information just let me know.

Regards

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

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

Post by jlehtone » 2021/08/16 18:08:29

You had already shown what you have and that the mirrorlist that you get has issues.

The question is, can you install the package in the URL and what does repolist show after installing that package?

jzmendo
Posts: 10
Joined: 2021/08/13 01:38:58

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

Post by jzmendo » 2021/08/16 18:20:22

Hi Jlehtone.

You mean to perform the following steps.?

$ sudo yum install http://ftp.osuosl.org/pub/centos/7.9.20 ... x86_64.rpm
$ sudo yum --enablerepo=* clean all
$ sudo yum repolist

Post Reply