大网数据广告活动
服务器运维问答

Could not resolve host: mirrorlist.centos.org; unknown error

· 52CE 我爱测

I'm very new to all of this, so forgive me if this is a common problem with a common answer. I've looked all around and can't find a solution to this problem. I've just installed CentOS 7 and decided to run yum update to make sur…

问题原文

原帖链接 · Caleb Collier · CC BY-SA 4.0

I'm very new to all of this, so forgive me if this is a common problem with a common answer. I've looked all around and can't find a solution to this problem. I've just installed CentOS 7 and decided to run yum update to make sure all of my stuff is up to date and get an error. I've tried to ping 8.8.8.8 as well as ping 192.168.0.1 and both times it tells me the network is unreachable. When viewing /etc/resolv.conf, it is populated, with 2 nameservers as well as search tds, so it's not as if it hasn't been populated. I wonder if it's some sort of problem with my network configuration. ip route is completely empty, and running nmcli d shows that I currently don't have a connection to the wifi card, Ethernet, or loopback. Interestingly enough, my wifi card wlp2s0 doesn't show up in etc/sysconfig/network-scripts at all.

Edit: Plugging the Ethernet in and setting onboot to yes fixes this problem. However, I forgot to mention that I'm doing this on a laptop. If it's possible, I'd rather be able to connect through wifi.

已采纳解答

原帖链接 · Caleb Collier · CC BY-SA 4.0

After doing some more digging around, I found that I needed to connect to the internet via Ethernet and yum install NetworkManager-wifi. After installing the wifi package, I connected to it by checking the wifi list with nmcli dev wifi list and then using nmcli --ask dev wifi connect <wifi name> properly connected to it.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-12-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。