国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

yum報(bào)錯(cuò)解決方法

2015-12-04 17:11:30 3625

yum報(bào)錯(cuò)解決手記
幫別人配置環(huán)境,系統(tǒng)是centos 6.5 64位,用yum安裝軟件時(shí)一直報(bào)錯(cuò),前后一共遇到兩個(gè)錯(cuò)誤:
錯(cuò)誤1:
[root@localhost yum.repos.d]# yum install telnet 
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
http://www.tjdsmy.cn/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
錯(cuò)誤2:

[root@localhost etc]# yum install telnet 
Loaded plugins: fastestmirror, security
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
服務(wù)器的網(wǎng)絡(luò)和dns是沒(méi)問(wèn)題的,yum.repo.d/Centos-Base.repo配置是默認(rèn)的,其它配置文件不清楚有沒(méi)有改過(guò)。

這兩個(gè)錯(cuò)誤都是和yum的$releasever變量有關(guān),這個(gè)變量會(huì)讀取centos-release包的內(nèi)容,解決方法是編輯/etc/yum.conf文件,將distroverpkg改為redhat-release或者centos-release即可

vim /etc/yum.conf
distroverpkg=redhat-release 
當(dāng)然,要保證服務(wù)器有centos-release包,這個(gè)包是隨系統(tǒng)安裝的,而且一般人不會(huì)干掉它

提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問(wèn)題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問(wèn)題: