今天,在执行curl时,突然发现这个报错,问题是之前完全没有出现过这样的情况。

[root@localhost ~]# curl www.baidu.com
curl: (6) Could not resolve host: www.baidu.com; 未知的错误

上网了解了一下,都说是DNS的问题,因此修改一下DNS配置

[root@localhost ~]# vim /etc/resolv.conf
// 原先的DNS
# Generated by NetworkManager
nameserver 8.8.8.8

// 修改后的DNS
# Generated by NetworkManager
nameserver 114.114.114.114
nameserver 8.8.8.8

参考:

https://blog.csdn.net/qq_32440951/article/details/80825259

curl: (6) Could not resolve host: www.baidu.com;的更多相关文章

  1. CentOS报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock32 error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

    今天安装完带图形界面的CentOS 7后,在Terminal中运行yum安装命令时报了以下错误: Could not retrieve mirrorlist http://mirrorlist.cen ...

  2. curl: (6) Couldn’t resolve host ‘www.ttlsa.com’

      上周, 部分站点出现Couldn't resolve host.....问题,  导致公司所有走api的程序都无法正常使用(系统redhat 6.3的都出现问题, redhat 5一切OK). 最 ...

  3. Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock32 error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

     今天安装完带图形界面的CentOS 7后,在Terminal中运行yum安装命令时报了以下错误: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...

  4. curl: (6) Couldn’t resolve host ‘www.ttlsa.com’【转】

    上周, 部分站点出现Couldn't resolve host.....问题,  导致公司所有走api的程序都无法正常使用(系统redhat 6.3的都出现问题, redhat 5一切OK). 最后解 ...

  5. yum 安装报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"

    [root@venn09 ~]# yum install -y vim Loaded plugins: fastestmirror Could not retrieve mirrorlist http ...

  6. yum安装软件报错:curl#6 - "Could not resolve host: mirrorlist.centos.org; Temporary failure in name resolut

    # yum install -y epel-release Loaded plugins: fastestmirror Repository base is listed more than once ...

  7. 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"

    14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" One of the configured ...

  8. 『cURL』curl: (6) Could not resolve host无法解析主机地址

    最近在学数据挖掘时,获取数据有两种途径: 开放数据,可以直接使用和存储的数据: 网络数据,通过爬虫或云市场api(付费或免费)获取数据 我通过教程,在阿里云购买一个天气数据api,尝试使用cURL获取 ...

  9. YUM安装软件提示[Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; 未知的错误"

    报错如下: 翻译过来就是 所以问题很简单: 第一种情况:本地DNS服务错误 第二种情况:远程主机挂了 第三种情况:远程主机地址配置错误 第一种解决方法:换DNS 首先验证一下是不是本地DNS错误 从上 ...

随机推荐

  1. What’s WOYO PDR-007 Paintless Dent Repair Heat Induction?

    when you car body with dent, which tools can fixing this problem? is there a device which with the c ...

  2. js获取浏览器信息

    function message() { txt = "<p>浏览器代码名: " + navigator.appCodeName + "</p>& ...

  3. 怎样从外网访问内网Jboss?

    本地安装了一个Jboss,只能在局域网内访问,怎样从外网也能访问到本地的Jboss呢?本文将介绍具体的实现步骤. 准备工作 安装并启动Jboss 默认安装的Jboss端口是8080. 实现步骤 下载并 ...

  4. SSL/TLS代理(termination proxy)

    A TLS termination proxy (or SSL termination proxy) is a proxy server that is used by an institution ...

  5. DevExpress GridControl使用方法总结2

    一.如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 二.如何新增一条记录 (1).gridView.AddN ...

  6. js的匿名函数 和普通函数

    匿名函数在声明时不用带上函数名, 可以把匿名函数当作一个function类型的值来对待 声明一个普通的函数 function func() { ... } 可以认为和var func = functi ...

  7. 尚硅谷面试第一季-07Spring Bean的作用域之间有什么区别

    目录结构: 关键性代码: beans.xml <!-- ★bean的作用域 可以通过scope属性来指定bean的作用域 -singleton:默认值.当IOC容器一创建就会创建bean的实例, ...

  8. delete指针

    是释放指针所指向的内存,而不是删除指针本身

  9. 复旦高等代数II(16级)每周一题

    每周一题的说明 一.本学期高代II的每周一题面向16级的同学,将定期更新(一般每周的周末公布下一周的题目); 二.欢迎16级的同学通过微信或书面方式提供解答图片或纸质文件给我,优秀的解答可以分享给大家 ...

  10. Bootstrap3基础 clearfix pull-left/right 辅助类样式 快速左右浮动

      内容 参数   OS   Windows 10 x64   browser   Firefox 65.0.2   framework     Bootstrap 3.3.7   editor    ...