Назад | Перейти на главную страницу

Проблемы с обновлением apt-get

У меня есть облачный сервер digitalocean (Ubuntu 16.04) что я установил свой ufw на. Когда я пытаюсь бежать apt-get update, Я получаю следующее:

Err:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Reading package lists... Done
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Что я пробовал:

mv /var/lib/apt/lists /var/lib/apt/lists.old 
apt-get clean
apt-get update
#<= Err:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Reading package lists... Done
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Вывод моего resolv.conf и моих серверов имен:

cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

cat /etc/network/interfaces.d/50-cloud-init.cfg
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
    dns-nameservers 67.207.67.2 67.207.67.3

ufw был настроен, чтобы разрешить apt-get разрешив порт 53 и порт 123. Даже отключив ufw дает те же результаты, я искал проблему в Google, и она кажется очень распространенной, но ни одно из исправлений не помогло мне, кто-нибудь знает какие-либо исправления для этой проблемы?

Можете ли вы попробовать отладить его еще немного с помощью следующих команд от имени пользователя root?

Я считаю, что вы можете не переопределять DNS of DO, потому что они используются для разрешения mirrors.digitalocean.com и других необходимых вещей (мониторинг, ntp ...).

Возможно, вы захотите добавить свои собственные серверы имен (67.207.67.2 67.207.67.3) с более низким приоритетом, чем серверы DO, вместо их замены.

Прямо сейчас у меня нет готовой капли для проверки, но это явно намек