apt-get update fails to fetch files,
“Temporary failure resolving …” error
Зачастую при:
- неверно настроенных записях DNS
- проблем с перенаправлением со стороны провайдера
- вашей ошибки при конфигурировании сетевого интерфейса к примеру на гипервизоре
может появится следующая ошибка:
Err http://archive.canonical.com natty InRelease Err http://security.ubuntu.com oneiric-security InRelease Err http://extras.ubuntu.com natty InRelease Err http://security.ubuntu.com oneiric-security Release.gpg Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease
Решением проблемы в данном случае будет следующее:
Во-первых, временно добавьте известный DNS-сервер в свою систему.
-
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
Или же на постоянной основе командой ниже.
-
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null