一、检验是否可以上网
ping www.baidu.com
二、如果不能上网:
1、cd到 /etc/sysconfig/network-scripts/
cd /etc/sysconfig/network-scripts/
()
2、ls找到 ifcfg-****(星号部分是随机的) 用vi打开
3、将ONBOOT=no 改为 yes
4、:wq保存并退出
5、重启网络服务
service network restart
三、如果可以联网,但yum install links(例)安装失败。原因是速度太慢,更换镜像源即可。如下:
1、备份你的原镜像文件,以免出错后可以恢复。
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
如果找不到原有的,就直接用新的源。
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 7:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、运行yum makecache生成缓存
以上就是“centos下yum安装失败怎么办 centos yum安装失败”的详细内容,更多请关注1818ip网其它相关文章!
相关文章
标签:CentOS
- •centos中的uuid是必须的吗 centos安装minicom必须联网吗
- •centos如何查看用户 centos如何查看用户密码
- •centos重启后时间不对怎么办 centos时间不同步怎么解决
- •如何解决centos7下chrome打不开的问题 centos安装chrome
- •centos下ping不通网关怎么办 centos ping不通网关怎么解决
- •centos7系统找不到网卡 centos7装完系统找不到网卡
- •centos中pear命令无法使用怎么办 pear是什么意思
- •centos怎么实现开机进入命令行模式 centos7开机进入命令行模式
- •centos无法进入图形界面怎么解决 centos无法进入图形界面
- •centos默认用户名密码是什么 centos默认用户名密码