Unable to update Centos 7

Issues related to applications and software problems
xanymorex
Posts: 7
Joined: 2020/11/06 00:19:19

Unable to update Centos 7

Post by xanymorex » 2020/11/06 00:22:50

Just install Centos 7 Minimal and can´t update or install nothing using yum, everytime I try I receive this message, already confirm timezone and time, already confirm if dns is ok and I´m reaching mirrorlist.centos.org, anyone can help me?

yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile


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: 29915
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to update Centos 7

Post by TrevorH » 2020/11/06 01:51:17

In the default install, the network is disabled unless you specifically enable it.

https://wiki.centos.org/FAQ/CentOS7#Why ... able_it.3F
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

xanymorex
Posts: 7
Joined: 2020/11/06 00:19:19

Re: Unable to update Centos 7

Post by xanymorex » 2020/11/06 13:09:57

I did enabled the network, I can ping everything the only thing that doesn´t work is YUM.

cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="eth0"
UUID="b3151458-f6c6-45a9-b246-ef168d2e616b"
DEVICE="eth0"
ONBOOT="yes"

pjsr2
Posts: 526
Joined: 2014/03/27 20:11:07

Re: Unable to update Centos 7

Post by pjsr2 » 2020/11/06 16:47:34

What is the content of the [base] section in /etc/yum.repos.d/CentOS-Base.repo ?

xanymorex
Posts: 7
Joined: 2020/11/06 00:19:19

Re: Unable to update Centos 7

Post by xanymorex » 2020/11/06 17:08:05

cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

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

bonedome
Posts: 181
Joined: 2017/04/22 08:11:04

Re: Unable to update Centos 7

Post by bonedome » 2020/11/06 19:48:43

Well that's the same as mine.
Have you tried the old yum clean all

xanymorex
Posts: 7
Joined: 2020/11/06 00:19:19

Re: Unable to update Centos 7

Post by xanymorex » 2020/11/06 23:43:46

Yep tried too.

yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors

yum repolist list
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')
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
repolist: 0

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

Re: Unable to update Centos 7

Post by jlehtone » 2020/11/07 23:50:21

What do you get with:

Code: Select all

curl 'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock'

xanymorex
Posts: 7
Joined: 2020/11/06 00:19:19

Re: Unable to update Centos 7

Post by xanymorex » 2020/11/09 16:05:00

# curl 'http://mirrorlist.centos.org/?release=7 ... nfra=stock'
curl: (52) Empty reply from server

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

Re: Unable to update Centos 7

Post by jlehtone » 2020/11/09 18:14:11

Is it sneaky DNS or firewall that stands between you and the world?

Post Reply

Return to “CentOS 7 - Software Support”