国产精品久久久久久亚洲影视,性爱视频一区二区,亚州综合图片,欧美成人午夜免费视在线看片

意見箱
恒創(chuàng)運(yùn)營部門將仔細(xì)參閱您的意見和建議,必要時(shí)將通過預(yù)留郵箱與您保持聯(lián)絡(luò)。感謝您的支持!
意見/建議
提交建議

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

來源:佚名 編輯:佚名
2024-02-02 15:30:11

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

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

第一步、備份原來的文件

執(zhí)行以下命令

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

第二步、在/etc/yum.repos.d/ 目錄下新建一個(gè)文件CentOS-Base.repo ,添加以下內(nèi)容

# 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

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

yum clean all

yum makecache

至此,Centos 6 的yum就配置好了,您可以執(zhí)行yum來安裝軟件或更新系統(tǒng)

本網(wǎng)站發(fā)布或轉(zhuǎn)載的文章均來自網(wǎng)絡(luò),其原創(chuàng)性以及文中表達(dá)的觀點(diǎn)和判斷不代表本網(wǎng)站。
上一篇: 修復(fù)wp安全隱患,防止xmlrpc.php被掃描 下一篇: 異地備份云如何配合寶塔面板使用?