centos6.5 yum源報(bào)錯(cuò)

[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安裝時(shí),提示以上錯(cuò)誤,百度的結(jié)果一般讓替換成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

替換后其實(shí)還是會(huì)有別的錯(cuò)誤? ?http://mirrors.163.com/centos/6.6/os/x86_64/repodata/repomd.xml? ?404錯(cuò)誤

直接打開(kāi)鏈接可以看到,確實(shí)沒(méi)有這些頁(yè)面,而且目錄下也沒(méi)有6.6一下的頁(yè)面目錄,6.6目錄頁(yè)下只有readme 文件,內(nèi)容如下:

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/

打開(kāi)這個(gè)地址可以看到6.5頁(yè)面目錄下的層級(jí)有os/x86_64/repodata,進(jìn)去看到也有repomd.xml文件

直接將163yum源的配置文件內(nèi)容修改為如下即可:替換內(nèi)容為加粗部分

# 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下的對(duì)應(yīng)版本目錄即可

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容