YumRepo Error: All mirror URLs are not using ftp, http[s] or file.

[root@Node1 etc]# yum list
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

查看文件
[root@Node1 etc]# cd /etc/yum.repos.d
[root@Node1 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
[root@Node1 yum.repos.d]# cat CentOS-Base.repo

根据网络提升修改CentOS-Base.repo文件内容:
[base]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 19: …easever - Base #̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=os&infra=infra
#baseurl=http://mirror.centos.org/centos/ r e l e a s e v e r / o s / releasever/os/ releasever/os/basearch/
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/os/x86_64/
gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/os/x86_64/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 22: …ever - Updates #̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=updates&in…infra
#baseurl=http://mirror.centos.org/centos/ r e l e a s e v e r / u p d a t e s / releasever/updates/ releasever/updates/basearch/
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/updates/x86_64/
gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/os/x86_64/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 21: …sever - Extras #̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=extras&inf…infra
#baseurl=http://mirror.centos.org/centos/ r e l e a s e v e r / e x t r a s / releasever/extras/ releasever/extras/basearch/
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/extras/x86_64/
gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/os/x86_64/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 19: …easever - Plus #̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=centosplus…infra
#baseurl=http://mirror.centos.org/centos/ r e l e a s e v e r / c e n t o s p l u s / releasever/centosplus/ releasever/centosplus/basearch/
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/centosplus/x86_64/
gpgcheck=1
enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/os/x86_64/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 22: …ever - Contrib #̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=contrib&in…infra
#baseurl=http://mirror.centos.org/centos/ r e l e a s e v e r / c o n t r i b / releasever/contrib/ releasever/contrib/basearch/
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/contrib/x86_64/
gpgcheck=1
enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/centos-vault/6.8/os/x86_64/RPM-GPG-KEY-CentOS-6

再次执行:
[root@Node1 yum.repos.d]# yum list
出现系统更新列表,
yum源正常可用。

参考建议:
https://blog.csdn.net/qq_39946015/article/details/111086184

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值