美文网首页
Node.js-linux-Could not resolve

Node.js-linux-Could not resolve

作者: hi_universe | 来源:发表于2022-03-04 09:01 被阅读0次

环境:在macos-vmware-linux(centOS7)

yum 不能正常使用 

Could not resolve host:mirrorlist.centos.org; Unknown error.网上查了下原因:“本机无法连接网络的网络设置”

步骤一:[root@localhost ~]# nmcli d

判断网络是否连接(显示未连接)

步骤二:[root@localhost ~]# nmtui(打开网络管理员)

1:选择“Edit a connection”后按回车键(使用TAB键进行选择的选项)

2:现在可以看到所有的网络接口,选择一个(我的是ens160),然后键盘上下左右键选择到“Edit”并Enter确认进入:

步骤4:进行动态配置:

  (1)在IPv4 CONFIGURATION配置选择<Automatic>;

  (2)按空格键选择“Automatically connetc”复选框;

  (3)点击OK键,退出网络管理器;

  (4)依次Back Exit,返回终端界面;

  (5)输入命令重新启动网络服务:[root@localhost ~]# systemctl restart network

图一 图二 这里【X】注意设置

相关文章

网友评论

      本文标题:Node.js-linux-Could not resolve

      本文链接:https://www.haomeiwen.com/subject/wjmprrtx.html