资讯 小学 初中 高中 语言 会计职称 学历提升 法考 计算机考试 医护考试 建工考试 教育百科
栏目分类:
子分类:
返回
空麓网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
空麓网 > 计算机考试 > 系统运维 > 运维 > Linux

centos 6 yum源不可用安装报YumRepo Error: All mirror URLs are not using ftp, http[s] or file

Linux 更新时间: 发布时间: 计算机考试归档 最新发布

centos 6 yum源不可用安装报YumRepo Error: All mirror URLs are not using ftp, http[s] or file

cat /etc/redhat-release查看版本
vim /etc/yum.repos.d/CentOS-base.repo
(可以先提前备份一下)
内容清空
将下面代码6.5改成自己的版本复制进去
(此处使用的是国外源,若使用国内源,请往下看)

[base]
name=CentOS-6.5 - base
#mirrorlist=http://#mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=os
baseurl=https://archive.kernel.org/centos-vault/6.5/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-6.5 - Updates
#mirrorlist=http://#mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=updates
baseurl=https://archive.kernel.org/centos-vault/6.5/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6.5 - Extras
#mirrorlist=http://#mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=extras
baseurl=https://archive.kernel.org/centos-vault/6.5/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.5 - Plus
#mirrorlist=http://#mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=centosplus
baseurl=https://archive.kernel.org/centos-vault/6.5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.5 - Contrib
#mirrorlist=http://#mirrorlist.centos.org/?release=6.5&arch=$basearch&repo=contrib
baseurl=https://archive.kernel.org/centos-vault/6.5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

清理缓存 
 # yum clean all  
 更新缓存
 # yum makecache
 #测试
 yum install -y unzip zip

由于比较慢
可以使用163 centos7的yum源

[base]
name=CentOS-7 - base - 163.com
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-7 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-7 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/7/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

参考:https://blog.csdn.net/weixin_44160584/article/details/110872926

转载请注明:文章转载自 http://www.konglu.com/
本文地址:http://www.konglu.com/it/509792.html
免责声明:

我们致力于保护作者版权,注重分享,被刊用文章【centos 6 yum源不可用安装报YumRepo Error: All mirror URLs are not using ftp, http[s] or file】因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理,本文部分文字与图片资源来自于网络,转载此文是出于传递更多信息之目的,若有来源标注错误或侵犯了您的合法权益,请立即通知我们,情况属实,我们会第一时间予以删除,并同时向您表示歉意,谢谢!

我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2023 成都空麓科技有限公司

ICP备案号:蜀ICP备2023000828号-2