CentOS系統(tǒng)使用yum命令報錯問題及解決
更新時間:2024年12月28日 09:32:28 作者:程序員阿明
文章主要講述了在CentOS系統(tǒng)中使用yum命令時遇到的錯誤,并提供了個人解決方法,希望對大家有所幫助,并鼓勵大家支持腳本之家
CentOS系統(tǒng)使用yum命令報錯
找到文件
/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-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/ gpgcheck=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/ gpgcheck=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/ gpgcheck=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/ gpgcheck=0 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 #contrib - packages by Centos Users #[contrib] #name=CentOS-$releasever - Contrib - mirrors.aliyun.com #failovermethod=priority #baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/ # http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/ # http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/ #gpgcheck=1 #enabled=0 #gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
總結
以上為個人經驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關文章
讓Apache支持Rewrite靜態(tài)頁面重寫的方法
Apache下Rewrite靜態(tài)頁面重寫的方法,需要的朋友可以參考下。2010-07-07Ubuntu18.04安裝Pycharm教程的實現(xiàn)
這篇文章主要介紹了Ubuntu18.04安裝Pycharm教程的實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2019-09-09CentOS Linux系統(tǒng)搭建Android開發(fā)環(huán)境詳細介紹
這篇文章主要介紹了CentOS Linux系統(tǒng)搭建Android開發(fā)環(huán)境詳細介紹的相關資料,需要的朋友可以參考下2016-11-11apache中的Worker 和 Prefork 之間的區(qū)別解析
Apache中的Worker和Prefork兩種工作模式在內存使用、穩(wěn)定性以及兼容性等方面存在區(qū)別,本文介紹apache中的Worker 和 Prefork 之間的區(qū)別,感興趣的朋友跟隨小編一起看看吧2024-11-11