TShopping

標題: yum安裝套件報錯訊息 [打印本頁]

作者: woff    時間: 2017-4-15 03:17
標題: yum安裝套件報錯訊息
新系統centos6.5,按照之前的方法安裝epel source:http :
//www.52os.net/articles/apache-rRedirecting-base-on-geoip.html

後無論安裝什麼軟件都會報錯:

  1. [root@localhost ~]# yum install ansible Loaded plugins: fastestmirror,
  2. refresh-packagekit, security Loading mirror speeds from cached
  3. hostfile Error: Cannot retrieve metalink for repository: epel. Please
  4. verify its path and try again
複製代碼


google了一下,解決方法:
編輯:/etc/yum.repos.d/epel.repo
將所有的

  1. #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch       mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
複製代碼


取消所有的baseurl的註釋,並註釋掉mirrorlist即可。
之後yum makecache。

參考文章:
http : //www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x
http://teddysun.com/153.html




歡迎光臨 TShopping (http://www.tshopping.com.tw/) Powered by Discuz! X3.2