标签:dia netlink telnet font 图片 find rac 两种 clean
Couldn‘t open file /mnt/cdrom/repodata/repomd.xml
find / -type f -name "repomd.xml"
我们看到路径是:/mnt
而报错的路径是:/mnt/cdrom
查看挂载点有mnt,故,我们需要找到这个路径,将 /mnt/cdrom修改为/mnt
cd /etc/yum.repos.d/
vi CentOS-Media.repo
将路径改成我们找到的路径:将 /mnt/cdrom修改为/mnt
yum clean all
yum makecache
yum install telnet
iptables-1.4.21-16.el7.i686: [Errno 256] No more mirrors to try.
libmnl-1.0.3-7.el7.i686: [Errno 256] No more mirrors to try.
libnetfilter_conntrack-1.0.4-2.el7.i686: [Errno 256] No more mirrors to try.
libnfnetlink-1.0.1-4.el7.i686: [Errno 256] No more mirrors to try.
测试查询原因
df -h
报错的路径是:/mnt/cdrom
df -h没有找到/mnt
ping: unknown host www.baidu.com
ping www.baidu.com
host www.baidu.com
针对无法连接百度,我目前遇到有两种:
1)有DNS:给 /etc/resolv.conf 添加上 nameserver=xxx.xxx.xxx.xxx(DNS码)
cat /etc/sysconfig/network-scripts/ifcfg-enxxxx
vi /etc/resolv.conf
2)无DNS:给 /etc/resolv.conf 添加上 nameserver=8.8.8.8(DNS码)
nameserver=8.8.8.8
测试:
第一步:备份你的原镜像文件,以免出错后可以恢复。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/
查看:
curl -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
下载:
wget-O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
标签:dia netlink telnet font 图片 find rac 两种 clean
原文地址:https://www.cnblogs.com/yybrhr/p/9559709.html