我正在尝试通过名为 UTM 的虚拟机在我的 M1 上安装 Ubuntu 18.04。
问题是我的 ubuntu 中“未找到 wifi 适配器”,因此我尝试运行sudo apt update
,但出现错误提示
Err:1 http://kr.ports.ubuntu.com/ubuntu-ports bionicInRelease
Could not resolve 'kr.ports.ubuntu.com'
Err:2 http://kr .ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
Could not resolve 'kr.ports.ubuntu.com'
Err:3 http://kr.ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Could not resolve 'kr.ports.ubuntu.com'
Err:4 http: //ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Could not resolve 'ports.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://kr.ports.ubuntu.com/ubuntu-ports/dists/bionic/InReleas
e Could not resolve 'kr.ports.ubuntu.com'
W: Failed to fetch http://kr.ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease
Could not resolve 'kr.ports.ubuntu.com'
W: Failed to fetch http: //kr.ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease
Could not resolve 'kr.ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease
Could not resolve 'ports. ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead
所以我找到了一个类似问题(运行 apt-get update 时出错)的解决方案,它是
- 运行
$ vi /etc/network/interfaces
并添加dns-nameservers 8.8.8.8 8.8.4.4
- 运行
$ vi /etc/resolv.conf
并添加nameserver 8.8.8.8
nameserver 8.8.4.4
,但我根本无法输入任何内容(终端屏幕截图)。
谁能帮我这个...?
编辑
我找到了一种编辑上述配置文件的方法,但我仍然无法成功运行sudo apt update
......