进入cd /etc/yum.repos.d 文件夹下有CentOS-Base.repo文件关于源的信息
报错:
[root@shopai2see-5c673986 yum.repos.d]# yum -y install lib-X11
Loaded plugins: fastestmirror
Setting up Install Process
Repository 'base' is missing name in configuration, using id
Determining fastest mirrors
base | 3.6 kB 00:00
base/primary_db | 4.1 MB 00:02
No package lib-X11 available.
Error: Nothing to do
问题:源里没有该包
报错:
http://centos.ustc.edu.cn/centos/6.5/os/i386/Packages/mlocate-0.22.2-4.el6.i686.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'centos.ustc.edu.cn'"Trying other mirror.
源有问题。
报错:Cannot retrieve repository metadata (repomd.xml) for repository
问题:yum源地址该更新了
换源:
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.bk
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
yum update
yum makecache