Problem whit apt-get update

March 30, 2017 22.6k views
Apache Ubuntu 16.04

I end up whit this error when i run apt-get update. Any suggestion on what i can do to fix this?

root@server1:~# apt-get update
Err:1 http://apt.izzysoft.de/ubuntu generic InRelease
Temporary failure resolving ‘apt.izzysoft.de’
Err:2 http://apt.newrelic.com/debian newrelic InRelease
Temporary failure resolving 'apt.newrelic.com’
Err:3 http://software.virtualmin.com/gpl/ubuntu virtualmin-xenial InRelease
Temporary failure resolving 'software.virtualmin.com’
Err:4 http://ppa.launchpad.net/ondrej/apache2/ubuntu xenial InRelease
Temporary failure resolving 'ppa.launchpad.net’
Err:5 http://software.virtualmin.com/gpl/ubuntu virtualmin-universal InRelease
Temporary failure resolving 'software.virtualmin.com’
Err:6 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease
Temporary failure resolving 'ppa.launchpad.net’
Err:7 http://archive.ubuntu.com/ubuntu xenial InRelease
Temporary failure resolving 'archive.ubuntu.com’
Err:8 http://security.ubuntu.com/ubuntu xenial-security InRelease
Temporary failure resolving 'security.ubuntu.com’
Err:9 https://deb.nodesource.com/node_4.x xenial InRelease
Could not resolve host: deb.nodesource.com
Err:10 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Temporary failure resolving 'archive.ubuntu.com’
Err:11 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Temporary failure resolving 'archive.ubuntu.com’
Reading package lists… Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.ubuntu.com’
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving 'archive.ubuntu.com’
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Temporary failure resolving 'archive.ubuntu.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://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-xenial/InRelease Temporary failure resolving 'software.virtualmin.com’
W: Failed to fetch http://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-universal/InRelease Temporary failure resolving 'software.virtualmin.com’
W: Failed to fetch http://apt.izzysoft.de/ubuntu/dists/generic/InRelease Temporary failure resolving 'apt.izzysoft.de’
W: Failed to fetch http://apt.newrelic.com/debian/dists/newrelic/InRelease Temporary failure resolving 'apt.newrelic.com’
W: Failed to fetch https://deb.nodesource.com/node_4.x/dists/xenial/InRelease Could not resolve host: deb.nodesource.com
W: Failed to fetch http://ppa.launchpad.net/ondrej/apache2/ubuntu/dists/xenial/InRelease Temporary failure resolving 'ppa.launchpad.net’
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.

2 Answers

Is this just happening or a problem from yesterday? Because there has been many problems with the Google DNS in the past couple of days, which is the default configured DNS on droplets.
You can manually modify the DNS to something else with this guide:
https://www.digitalocean.com/community/questions/how-do-i-switch-my-dns-resolvers-away-from-google

  • It only include this info

    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

    Nothing more.

    • Well, that’s your problem. If you reboot your droplet, does the resolv.conf file then contain more information?

      Otherwise simply edit the file so it looks like this (as a temporary solution; will reset on reboot)

      8.8.4.4
      8.8.8.8
      

Using route table connect network
if the network have more one default route del route table
Ex:
with the route -n command you’ll obtain

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.178.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 160.98.123.1 0.0.0.0 UG 600 0 0 wlan0

sudo route del -net 0.0.0.0 gw 192.168.178.1 netmask 0.0.0.0 dev eth0

Or

sudo ip route add 160.98.123.1/24 via 10.0.0.101 dev wlan0

Have another answer? Share your knowledge.