One of the configured repositories failed (Unknown), and Yum doesn ' t has enough cached data to continue. At this point, the only safe thing Yum can does is fail. There is a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the P
Roblem. 2. Reconfigure the baseurl/etc. For the repository, to point to a working upstream. This was most often useful if you were using a newer distribution release than was supported by the repository (and
The packages for the previous distribution release still work). 3. Disable the Repository, so Yum won ' t use it by default. Yum would then just ignore the repository until you permanently enable it again or use--enablerepo for Temporary Usage:yum-config-manager--disable <repoid> 4.
Configure the failing repository to being skipped, if it is unavailable. Note that Yum would try to coNtact the repo. When the It runs most commands, so would have the to try and the fail each time (and thus. Yum'll be is much slow ER). If It is a very temporary problem though, this is often a nice compromise:yum-config-manage R--save--setopt=<repoid>.skip_if_unavailable=true cannot find a valid baseurl for repo:base/7/x86_64
It takes two steps to modify it.
The first step: vi/etc/resolv.conf, add the following line will be
[OBJC] view plain copy nameserver 114.114.114.114 (This is a domestic DNS server system, or relatively useful.) Google can use 8.8.8.8) after modifying the service network Restart to restart, try the Yum Update command, it should be. If you don't, you can do the next step.
The second step: Enter/ETC/YUM.REPOS.D, edit VI Centos-base.repo, modify the following yellow logo (just comment out the first line, uncomment the second line is OK)
# 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 is updated to and
# Geographically close to the client. You should the use of this for CentOS updates
# Unless you is manually picking other mirrors.
#
# If The mirrorlist= does not work for you, as a fall back to you can try the
# remarked out Baseurl= line instead.
#
#
[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 could 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
~
"Centos-base.repo" 44L, 1664C
Complete the above two steps, and then re-execute the Yum update and other installation commands to run properly.