当前位置: 首页 > news >正文

centos 网络: DNS解析错误

项目场景:

提示:这里简述项目相关背景:

centos安装postgresql无法解析域名


问题描述

提示:这里描述项目中遇到的问题:

[root@localhost ~]# yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
已加载插件:fastestmirror, langpacks
无法打开 https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm ,跳过。
错误:无须任何处理
[root@localhost ~]# wget https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
--2024-08-21 12:04:12--  https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
正在解析主机 download.postgresql.org (download.postgresql.org)... 失败:未知的名称或服务。
wget: 无法解析主机地址 “download.postgresql.org”
[root@localhost ~]# ping www.baidu.com
ping: www.baidu.com: 未知的名称或服务

试着ping 百度域名也没用


原因分析:

提示:这里填写问题的分析:

这通常是由于 DNS 解析失败导致的

/etc/resolv.conf 中配置公用的DNS服务器

[root@localhost ~]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8

配置之后,ping 百度就正常了

[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (180.101.50.188) 56(84) bytes of data.
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=1 ttl=53 time=4.23 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=2 ttl=53 time=4.18 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=3 ttl=53 time=4.70 ms
^C

http://www.mrgr.cn/news/4361.html

相关文章:

  • 九毛九净利润骤降:翻台率、人均消费下滑,股价今年跌六成
  • 【Linux 驱动】IMX6ULL pinctrl驱动
  • 聊聊最近很火的后端即服务
  • 开发团队如何专业的应对突如其来的技术故障与危机?
  • 二叉树学习笔记
  • [数据集][目标检测]集装箱缺陷检测数据集VOC+YOLO格式4127张3类别
  • 在全球开源“集市”新时代,共创中国根社区的领导力
  • 由于找不到 mfc140u.dll,无法继续执行代码。重新安装程序可能会解决此问题。
  • c++每日练习记录第1天
  • 网络安全学习路线图(2024版详解)
  • 什么是BERT?工程快速入门
  • 【SpringBoot】使用Spring Boot、MyBatis-Plus和MySQL来实现增删改查操作,并添加自定义SQL查询。
  • Ansible可视化管理之web界面集成使用探究(未完待续)
  • 【PHPSTORM 使用非挂起断点】
  • SpringBootWeb 篇-深入了解 SpringBoot + Vue 的前后端分离项目部署上线与 Nginx 配置文件结构
  • echo “Hello, UDP!“ | nc -u -w1 192.168.1.100 1234 里面有换行符
  • 微前端架构下的性能优化:模块化开发与服务网格的协同
  • 通过https方式访问内网IP
  • Centos安装Jenkins教程详解版(JDK8+Jenkins2.346.1)
  • 深入浅出:理解TCP传输控制协议的核心概念