CentOS系統(tǒng)使用yum命令報(bào)錯(cuò)問題及解決
更新時(shí)間:2024年12月28日 09:32:28 作者:程序員阿明
文章主要講述了在CentOS系統(tǒng)中使用yum命令時(shí)遇到的錯(cuò)誤,并提供了個(gè)人解決方法,希望對大家有所幫助,并鼓勵(lì)大家支持腳本之家
CentOS系統(tǒng)使用yum命令報(bào)錯(cuò)
找到文件
/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
總結(jié)
以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
ubuntu下安裝Python多版本的方法及注意事項(xiàng)
倒霉的今天我居然把ubuntu系統(tǒng)給完壞了,因?yàn)槲野裵ython3卸載了,然后就哦了,下面小編給大家分享下ubuntu下管理python的多個(gè)版本的方法,本文給大家介紹的非常詳細(xì),感興趣的朋友一起看下吧2016-10-10
centos7修改系統(tǒng)語言為簡體中文的實(shí)現(xiàn)
這篇文章主要介紹了centos7修改系統(tǒng)語言為簡體中文的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-04-04
Apache Flink 任意 JAR 包上傳漏洞利用及防范策略分析
這篇文章主要介紹了Apache Flink 任意 JAR 包上傳漏洞利用及防范策略, 本文提供的案例和方法僅用于教學(xué)目的,實(shí)際操作時(shí)應(yīng)確保遵守相關(guān)法律法規(guī),不應(yīng)用于非法侵入或攻擊他人系統(tǒng),需要的朋友可以參考下2024-07-07
詳解CentOS8更換yum源后出現(xiàn)同步倉庫緩存失敗的問題
這篇文章主要介紹了詳解CentOS8更換yum源后出現(xiàn)同步倉庫緩存失敗的問題,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-03-03
關(guān)于Linux命令行下的數(shù)學(xué)運(yùn)算示例詳解
在Linux中直接使用數(shù)學(xué)運(yùn)算符進(jìn)行數(shù)學(xué)運(yùn)算往往得不到我們想要的計(jì)算結(jié)果。要在Shell中進(jìn)行數(shù)學(xué)運(yùn)算,我們需要借助點(diǎn)小手段。下面這篇文章主要給大家介紹了關(guān)于Linux命令行下的數(shù)學(xué)運(yùn)算的相關(guān)資料,需要的朋友可以參考下2018-05-05
Centos6.5全自動(dòng)安裝 vsftpd+dhcp+nfs+tftp
本文主要記述了在Centos6.5中,如何配置無人值守安裝vsftpd+dhcp+nfs+tftp,非常實(shí)用,希望對大家能有所幫助。2014-09-09

