Error downloading packages:
centos-release-scl-rh-2-3.el7.centos.noarch: [Errno 256] No more mirrors to try.
centos-release-scl-2-3.el7.centos.noarch: [Errno 256] No more mirrors to try.
解決辦法:
一、更新yum
yum clean all
yum makecache
yum update -y
二、若不行映琳,可能是因?yàn)镈NS不穩(wěn)定吧砰逻,因?yàn)閥um安裝時(shí)會(huì)從三個(gè)”repo源“(base,extras洲守,updates)隨機(jī)獲取地址
(1)編輯網(wǎng)絡(luò)配置:vi /etc/sysconfig/network-scripts/ifcfg-eth0
在本地網(wǎng)關(guān)DNS1下片酝,添加aliyun網(wǎng)關(guān) DNS2=223.5.5.5(可以理解為:將base,updates的“repo源”換為aliyun的)
重啟網(wǎng)絡(luò)服務(wù):service network restart
(2)上步驟若還不行葬毫,請(qǐng)繼續(xù)以下步驟(換yum源,可以理解為上一步的plus屡穗,再將extras換為aliyun的源)
先備份老源:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
CentOS7系統(tǒng):wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
具體方法參考阿里云官方:https://developer.aliyun.com/mir ... .0.0.3e221b11iDH0bA
(3)刷新并生成緩存
yum clean all
yum makecache