apt更新显示以下错误消息Err:1 http://ports.ubuntu.com xenial InRelease Temporary failure resolving ‘ports.ubunt

apt更新显示以下错误消息Err:1 http://ports.ubuntu.com xenial InRelease Temporary failure resolving ‘ports.ubuntu.com

Err:1 http://ports.ubuntu.com xenial InRelease

  Temporary failure resolving 'ports.ubuntu.com'

Err:2 http://ppa.launchpad.net/flexiondotorg/minecraft/ubuntu xenial InRelease

  Temporary failure resolving 'ppa.launchpad.net'

Err:3 http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial InRelease

  Temporary failure resolving 'ppa.launchpad.net'

Err:4 http://ppa.launchpad.net/ubuntu-mate-dev/xenial-mate/ubuntu xenial InRelease

  Temporary failure resolving 'ppa.launchpad.net'

Err:5 http://ppa.launchpad.net/ubuntu-pi-flavour-makers/ppa/ubuntu xenial InRelease

  Temporary failure resolving 'ppa.launchpad.net'

Err:6 http://ports.ubuntu.com xenial-updates InRelease

  Temporary failure resolving 'ports.ubuntu.com'

Err:7 http://ports.ubuntu.com xenial-security InRelease

  Temporary failure resolving 'ports.ubuntu.com'

Err:8 http://ports.ubuntu.com xenial-backports InRelease

  Temporary failure resolving 'ports.ubuntu.com'

Err:9 http://ports.ubuntu.com/ubuntu-ports xenial InRelease

  Temporary failure resolving 'ports.ubuntu.com'

解决方法1

显示此错误消息,网上查找原因,有一个博主说明是因为网络的原因。

  1. 请检查您的设备是否已连接到Internet,如果一切正常,则可能是DNS存在问题。

  2. 在这种情况下,打开’/etc/network/interfaces’文件,添加

    dns-nameservers  223.5.5.5   223.6.6.6
    
  3. 打开’/etc/resolv.conf’文件并添加两行’

    nameserver  223..5.5.5 
    nameserver  223.6.6.6
    

如果再次运行sudo apt-get update,更新将正常进行。

解决方法2

或者在右上角网络图标。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

上面两种方法,改完之后,如果还不行,重启一下电脑试试。

root@6527d9173397:/# apt update Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Temporary failure resolving 'security.ubuntu.com' Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease Temporary failure resolving 'archive.ubuntu.com' Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Temporary failure resolving 'archive.ubuntu.com' Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Temporary failure resolving 'archive.ubuntu.com' Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date. W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease Temporary failure resolving 'security.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead.
06-12
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值