[root@node0002 ~]# yum install man man-pages
Loaded plugins: fastestmirror
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
yum安裝時吧享,提示以上錯誤猴鲫,百度的結果一般讓替換成163驹碍、阿里的yum源
[root@node0001 yum.repos.d]# yum clean all && yum makecache
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
Loaded plugins: fastestmirror
Determining fastest mirrors
http://mirrors.163.com/centos/6.5/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
替換后其實還是會有別的錯誤? ?http://mirrors.163.com/centos/6.6/os/x86_64/repodata/repomd.xml? ?404錯誤
直接打開鏈接可以看到,確實沒有這些頁面够庙,而且目錄下也沒有6.6一下的頁面目錄靠娱,6.6目錄頁下只有readme 文件,內容如下:
This directory (and version of CentOS) is deprecated. For normal users,
you should use /6/ and not /6.6/ in your path. Please see this FAQ
concerning the CentOS release scheme:
https://wiki.centos.org/FAQ/General
If you know what you are doing, and absolutely want to remain at the 6.6
level, go to http://vault.centos.org/ for packages.
Please keep in mind that 6.0, 6.1, 6.2, 6.3, 6.4 , 6.5 and 6.6 no longer gets any updates, nor
any security fix's.
大致意思就是讓你去這里找包就行了:http://vault.centos.org/
打開這個地址可以看到6.5頁面目錄下的層級有os/x86_64/repodata敛纲,進去看到也有repomd.xml文件
直接將163yum源的配置文件內容修改為如下即可:替換內容為加粗部分
# 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 - 163.com
baseurl=https://vault.centos.org/6.5/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
baseurl=https://vault.centos.org/6.5/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
baseurl=https://vault.centos.org/6.5/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=https://vault.centos.org/6.5/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - 163.com
baseurl=https://vault.centos.org/6.5/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
然后執(zhí)行 yum clean all && yum makecache 即可喂击,其他版本按照此思路替換成https://vault.centos.org下的對應版本目錄即可