[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