Curl: (6) Could not resolve host:www.baidu.com;

Source: Internet
Author: User
Today, when we do curl, I suddenly find this error, and the problem is that it didn't happen before.


[Email protected] ~]# Curl www.baidu.com

Curl: (6) Could not resolve host:www.baidu.com; Unknown error

On the Internet to understand, are said to be a DNS problem, so modify the DNS configuration


[Email protected] ~]# vim/etc/resolv.conf

[Email protected] yum.repos.d]# cat/etc/resolv.conf

# Generated by NetworkManager

# No nameservers found; Try putting DNS servers into your

# ifcfg files in/etc/sysconfig/network-scripts like so:

#

# dns1=xxx.xxx.xxx.xxx

# dns2=xxx.xxx.xxx.xxx

# domain=lab.foo.com Bar.foo.com

NameServer 114.114.114.114 #添加DNS

NameServer 8.8.8.8


The result is only added nameserver 114.114.114.114 on the Internet, it is possible that the telecommunications DNS has been adjusted, but the specific reasons are still unknown.


Curl: (6) Could not resolve host:www.baidu.com;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.