yum -y install 问题解决

1、错误如下:

Last login: Thu Jul 26 09:04:14 2018 from 192.168.3.250
[root@diagbot01 ~]# yum -y install dos2unix
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

2、解决方案

sed -i '1a nameserver 8.8.8.8' /etc/resolv.conf

猜你喜欢

转载自www.cnblogs.com/kwzblog/p/9370424.html