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

或者在右上角网络图标。
apt更新显示以下错误消息Err:1 http://ports.ubuntu.com xenial InRelease Temporary failure resolving ‘ports.ubunt_第1张图片
apt更新显示以下错误消息Err:1 http://ports.ubuntu.com xenial InRelease Temporary failure resolving ‘ports.ubunt_第2张图片
apt更新显示以下错误消息Err:1 http://ports.ubuntu.com xenial InRelease Temporary failure resolving ‘ports.ubunt_第3张图片

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

你可能感兴趣的:(linux)