记一次centos5 yum报错

由于要兼容公司旧版本系统,所以使用docker 安装centos5
启动后发现yum无法使用

[root@d79f04fec1ef /]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt

发现没有/var/cache/yum/base/mirrorlist.txt文件,就手动创建

echo "http://vault.centos.org/5.11/os/x86_64/" > /var/cache/yum/base/mirrorlist.txt 
echo "http://vault.centos.org/5.11/extras/x86_64/" > /var/cache/yum/extras/mirrorlist.txt 
echo "http://vault.centos.org/5.11/updates/x86_64/" > /var/cache/yum/updates/mirrorlist.txt

还有报错,这次提示是因为libselinux

> /etc/yum.repos.d/libselinux.repo

重新执行yum恢复

你可能感兴趣的:(记一次centos5 yum报错)