出现“Could not resolve host: www.github.com; Unknown error”错误解决

  • 一、报错提示
  • 二、测试外网百度域名访问
  • 三、查看dns配置
  • 四、配置dns
  • 五、测试外网访问下载

一、报错提示

[root@node-1 ~]# curl www.github.com
curl: (6) Could not resolve host: www.github.com; Unknown error

二、测试外网百度域名访问

[root@node-1 ~]# ping www.baidu.com
ping: unknown host www.baidu.com

三、查看dns配置

[root@node-1 network-scripts]# cat ifcfg-eth0
TYPE="Ethernet"
BOOTPROTO=none
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eth0"
UUID="c3b26ff5-82d4-450a-8a3b-e19a19c1bd4c"
DEVICE="eth0"
ONBOOT="yes"
IPADDR=192.168.3.11
PREFIX=24
GATEWAY=192.168.3.254
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

四、配置dns

[root@node-1 network-scripts]# nmcli con modify eth0 ipv4.dns 192.168.3.254 ipv4.method manual
[root@node-1 network-scripts]# nmcli con reload
[root@node-1 network-scripts]# nmcli con up eth0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)

五、测试外网访问下载

[root@node-1 network-scripts]# ping www.baidu.com -c 4
PING www.a.shifen.com (112.80.248.76) 56(84) bytes of data.
64 bytes from 112.80.248.76: icmp_seq=1 ttl=55 time=22.1 ms
64 bytes from 112.80.248.76: icmp_seq=2 ttl=55 time=22.2 ms
64 bytes from 112.80.248.76: icmp_seq=3 ttl=55 time=22.0 ms
64 bytes from 112.80.248.76: icmp_seq=4 ttl=55 time=21.7 ms--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 21.785/22.051/22.253/0.231 ms[root@node-1 ~]#
[root@node-1 ~]# wget https://dl.360safe.com/360zip_setup.exe
--2021-12-31 23:38:54--  https://dl.360safe.com/360zip_setup.exe
Resolving dl.360safe.com (dl.360safe.com)... 36.32.131.66, 36.32.131.67, 118.212.132.249, ...
Connecting to dl.360safe.com (dl.360safe.com)|36.32.131.66|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14771792 (14M) [application/octet-stream]
Saving to: ‘360zip_setup.exe’100%[=============================================================================================>] 14,771,792  15.5MB/s   in 0.9s   2021-12-31 23:38:55 (15.5 MB/s) - ‘360zip_setup.exe’ saved [14771792/14771792]

出现“Could not resolve host: www.github.com; Unknown error”错误解决相关推荐

  1. 关于git的fatal: unable to access ‘https://gitee.com/‘: Could not resolve host: gitee.com; Unknown error

    关于GIT 的 fatal: unable to access 'https://gitee.com/项目名称/ceshi.git/': Could not resolve host: gitee.c ...

  2. yum install git Could not resolve host: ftp.twaren.net; Unknown error

    yum 安装软件,报错如下: 解决方案 步骤一 配置域名解析: vi /etc/resolv.conf 追加 nameserver 8.8.8.8nameserver 8.8.4.4 步骤二 重启网卡 ...

  3. The authenticity of host ‘XXXX‘ can‘t be established错误解决

    The authenticity of host 'XXXX' can't be established错误解决 修改/etc/ssh/ssh_config文件的配置,以后则不会再出现此问题 需要使用 ...

  4. docker build 没有网络 执行dockerfile中yum报错 curl#6 - “Could not resolve host: mirrorlist.centos.org 解决方法

    报错现象 Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo= ...

  5. 安装docker遇到的坑 Could not resolve host: download.docker.com;

    我写的 1.编辑网卡 vim /etc/sysconfig/network-scripts/ifcfg-ens33 2.增加这三行 DNS1=8.8.8.8 DNS2=114.114.114.114 ...

  6. Rust编译`Couldn‘t resolve host name (Could not resolve host: crates)` 错误的解决办法

    在编译Rust源程序时,可能会出现如下 Couldn't resolve host name (Could not resolve host: crates) 错误(见 https://github. ...

  7. yum使用时 could not resolve host 报错的解决方法

    [root@cloud test]# yum list 已加载插件:fastestmirror http://mirrors.163.com/centos/7/os/x86_64/repodata/r ...

  8. git clone 出现错误 Could not resolve host: github.com

    git clone 出现错误 Could not resolve host: github.com 一.错误原因 二.解决方法 1.解析出域名对应的IP地址 2.把域名和IP地址添加到主机的hosts ...

  9. hexo提交报错 unable to access ‘https://github.com/*/*.github.io.git/‘: Couldn‘t resolve host ‘github.com

    title: >- hexo提交报错 unable to access 'https://github.com//.github.io.git/': Couldn't resolve host ...

最新文章

  1. 「数据结构」图基础篇
  2. nessus国内用户不让免费使用了!
  3. python爬取贴吧所有帖子-通过python爬取贴吧数据并保存为word
  4. Ubuntu 压缩解压汇总(自己常用+持续更新)
  5. mybatis一级缓存命中条件
  6. Apache Tomcat/7.0.47
  7. 超越95%面试者的秘籍 part 1
  8. ps导出gif颜色不对_PS の手绘《超详细的动态表情包新手绘制指南》
  9. 函数栈帧的创建和销毁图解
  10. jdk文件夹里点哪个是安装_jdk在哪个文件夹里面
  11. 怎么删除映射网络里的计算机,W7怎么样删除映射上网网络驱动器
  12. 用python编写仓库管理系统_花了一天做的一个简单的仓库管理系统
  13. 电脑CPU型号是什么意思?
  14. 知乎上100条简短深刻的回答
  15. STM32与串口屏交互(USART HMI)
  16. 操作系统与硬件、其他系统软件以及用户之间的关系
  17. Win11如何把d盘空间分给c盘?Win11d盘分盘出来给c盘的方法
  18. java毕业设计物业信息管理系统源码+lw文档+mybatis+系统+mysql数据库+调试
  19. THE FOOL 【找规律】
  20. 学生学籍管理系统html代码,学生学籍管理系统源代码.doc

热门文章

  1. iOS开发——导入第三方库引起的unknown type name 'NSString'
  2. Mysql在大型网站的应用架构演变
  3. class a_class;与new class();的区别
  4. 59.进程的三种状态,以及之间转换的过程
  5. Fedora 34 Beta发布:引入GNOME 40巨大桌面升级
  6. 量子计算时代快了!量子计算机的架构,硬件,软件等都有成果!
  7. AI大牛压箱底的14本2018年进阶书(附PDF链接)
  8. 自动控制理论及matlab,自动控制理论及MATLAB实现
  9. java实验报告 05 类与_java程序设计类与方法-java实验报告
  10. c语言归并排序代码详细注释,C语言实现排序算法之归并排序详解