redhat 7安裝CentOS 7 yum源

按照網(wǎng)上的做法安裝,遇到這個(gè)問題

python-urlgrabber >= 3.10-8 is needed by yum-3.4.3-150.el7.centos.noarch

最終解決方案,安裝低配的包。
鏈接:https://pan.baidu.com/s/1b2ObRrvVZO6ZmFXIsrlt5Q 密碼:bcqx

1.查看red hat7 自帶的yum 軟件包
rpm -qa | grep yum
2.卸載這些軟件包
3.安裝上面低配的包(百度云里的)
rpm -ivh yum-*
4.新建repo 配置文件;
vim /etc/yum.repos.d/CentOS-Base.repo

#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-$7 - Base - 163.com 
#mirrorlist=[http://mirrorlist.centos.org/?release=7&arch=<math xmlns="http://www.w3.org/1998/Math/MathML"><merror><mtext>7&arch=</mtext></merror></math>basearch&repo=os](http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os) 
baseurl=[http://mirrors.163.com/centos/7/os/$basearch/](http://mirrors.163.com/centos/7/os/$basearch/) 
gpgcheck=1 
gpgkey=[http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7](http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7)

#released updates 
[updates] 
name=CentOS-$7 - Updates - 163.com 
#mirrorlist=[http://mirrorlist.centos.org/?release=7&arch=<math xmlns="http://www.w3.org/1998/Math/MathML"><merror><mtext>7&arch=</mtext></merror></math>basearch&repo=updates](http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates) 
baseurl=[http://mirrors.163.com/centos/7/updates/$basearch/](http://mirrors.163.com/centos/7/updates/$basearch/) 
gpgcheck=1 
gpgkey=[http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7](http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7)

#additional packages that may be useful 
[extras] 
name=CentOS-$7 - Extras - 163.com 
#mirrorlist=[http://mirrorlist.centos.org/?release=7&arch=<math xmlns="http://www.w3.org/1998/Math/MathML"><merror><mtext>7&arch=</mtext></merror></math>basearch&repo=extras](http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras) 
baseurl=[http://mirrors.163.com/centos/7/extras/$basearch/](http://mirrors.163.com/centos/7/extras/$basearch/) 
gpgcheck=1 
gpgkey=[http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7](http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7)

#additional packages that extend functionality of existing packages 
[centosplus] 
name=CentOS-$7 - Plus - 163.com 
baseurl=[http://mirrors.163.com/centos/7/centosplus/$basearch/](http://mirrors.163.com/centos/7/centosplus/$basearch/) 
gpgcheck=1 
enabled=0 
gpgkey=[http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7](http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7)

5.清除緩存
yum clean all
6.yum install bind 測(cè)試一下 安裝成功

最后編輯于
?著作權(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)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

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