若该文为原创文章,转载请注明原文出处
本文章博客地址:https://hpzwl.blog.csdn.net/article/details/129627983
红胖子(红模仿)的博文大全:开发技术集合(包含Qt实用技术、树莓派、三维、OpenCV、OpenGL、ffmpeg、OSG、单片机、软硬结合等等)持续更新中…
Qt开发专栏:各种问题解决
问题
在centOS7.5上开发Qt,安装完成后,需要下载安装一些软件,发现yum update报错:[Errno 14] curl#6 - “Could not resolve host: vault.centos.org; Unknown error”。
原因
1.本次是首先网卡不通,ping百度不通
2.源不通,需要修改源,只记录最后成功的方法。
解决方法
在域名server配置中。加入一个8.8.8.8,就攻克了:
vi /etc/resolv.conf
添加:
nameserver 8.8.8.8
nameserver 211.155.23.88
nameserver 211.155.27.88
能ping通了:
yum update报错:
依次执行下列指令:
cd /etc/yum.repos.d
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum update
成功。
若该文为原创文章,转载请注明原文出处
本文章博客地址:https://hpzwl.blog.csdn.net/article/details/129627983