报错curl: (6) Could not resolve host: www.baidu.com;
有可能是解析DNS错误修改/etc/resolv.conf文件
解决方法 :vi /etc/resolv.conf 在后面添加下面两段代码 ,不需要重启网卡,
nameserver 114.114.114.114
nameserver 8.8.8.8
添加完之后检验是否能够访问网络 curl https://www.baidu.com/
报错curl: (6) Could not resolve host: www.baidu.com;
有可能是解析DNS错误修改/etc/resolv.conf文件
解决方法 :vi /etc/resolv.conf 在后面添加下面两段代码 ,不需要重启网卡,
nameserver 114.114.114.114
nameserver 8.8.8.8
添加完之后检验是否能够访问网络 curl https://www.baidu.com/