狠狠躁夜夜躁人人爽天天不卡软件丨成·人免费午夜无码视频丨国产成人无码18禁午夜福利免费丨欧美一区二区婷婷香蕉狠狠干丨色欲国产精品一区二区

技術文檔

幫助中心 > 技術文檔 >

CentOS6配置yum源,yum不能用怎么辦?

2023-11-16 作者:簡米科技 閱讀量:0 所屬分類:技術文檔

CentOS6配置yum源,yum不能用怎么辦?Centos6的yum不能用怎么辦?Command line error: no such option: -l

項目開發需要使用到centos6.10和devtoolset-6。但是CentOS6官方于2020年11月30日已經停止維護,而Centos6系統自帶Yum想要連接舊版本的倉庫,因此想要解決yum安裝出現YumRepo Error: All mirror URLs are not using ftp, http[s] or file.報錯,我們需要更新陳舊版本的倉庫讓它指向可用的vault。

第一步、備份原來的文件

執行以下命令

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

第二步、在/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-6.10 - Base - mirrors.aliyun.com

failovermethod=priority

baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/

gpgcheck=1

gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-6.10 - Updates - mirrors.aliyun.com

failovermethod=priority

baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/

gpgcheck=1

gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-6.10 - Extras - mirrors.aliyun.com

failovermethod=priority

baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/

gpgcheck=1

gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-6.10 - Plus - mirrors.aliyun.com

failovermethod=priority

baseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users

[contrib]

name=CentOS-6.10 - Contrib - mirrors.aliyun.com

failovermethod=priority

baseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

第三步、執行以下命令, 使yum源生效

yum clean all

yum makecache

至此,Centos 6 的yum就配置好了,您可以執行yum來安裝軟件或更新系統

標簽:

本文地址:http://www.yganxi.com/help/10.html

簡米科技服務器支持24小時免費測試


成為簡米科技會員,享受出眾的上云實踐機會和周到的尊貴服務!
主站蜘蛛池模板: 桓台县| 阿瓦提县| 扶沟县| 湖州市| 永吉县| 奉化市| 定远县| 个旧市| 齐河县| 瓦房店市| 浪卡子县| 乌兰察布市| 中牟县| 汝南县| 台南市| 调兵山市| 巫溪县| 浏阳市| 尉氏县| 南开区| 昆明市| 布拖县| 兴安盟| 会宁县| 册亨县| 无为县| 玛纳斯县| 南城县| 中牟县| 北海市| 灵丘县| 新疆| 曲水县| 西乌珠穆沁旗| 永福县| 嘉祥县| 伊吾县| 长沙市| 清镇市| 越西县| 克拉玛依市|