更新新安装时出错

更新新安装时出错

安装 Ubuntu 后,我尝试运行sudo apt-get update,但失败并显示以下错误消息:

sudo apt-get update
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
  Temporary failure resolving 'archive.ubuntu.com'  
Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'  
Err:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'  
Err:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease
  Temporary failure resolving 'archive.ubuntu.com'  
Reading package lists... Done  
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Temporary failure resolving 'archive.ubuntu.com'    
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'    
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'    
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-security/InReleaseTemporary failure resolving 'archive.ubuntu.com'   
W: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

您的 PC 无法连接到更新所需的存储库。您的以太网网线是否已连接?如果您使用 WiFi 而不是以太网,您是否已选择 WiFi 接入点并成功输入密码?

然后,在最后三行中,您尝试启动 gedit 编辑器,但该编辑器未安装,并且不属于基本安装。也许您可以改用 nano,它是发行版的一部分?

相关内容