Could not resolve mirrors.digitaloccean.com

September 11, 2014 6.5k views

Hi,

When I try to run apt-get update or anything else I get this error Could not resolve mirrors.digitaloccean.com.

I cannot do anything with my droplet.

Do you know what the problem might be?

1 comment
  • I had this problem while running Virtualmin and trying to fix a mailer issue. I changed the resolution order to start with the host file instead of DNS just to see if that would fix it, but it just ended up messing with my updates. I changed it back to DNS first and it worked fine again.

7 Answers

Hi!

The DigitalOcean mirrors are resolving correctly for me. You wrote mirrors.digitaloccean.com above. Is that just a typo in your question or is that what's actually on your system? It should be mirrors.digitalocean.com Make sure your sources are correct:

nano /etc/apt/sources.list

Hi,

I have the same issue, and I will love not to rebuild my droplet

  • I agree. I would rather not rebuild my droplet. It took long enough to get it set up and I don't really have the time nor energy to set it up again.

It was something wrong with the droplet. I rebuild it and I could use normal commands and the problem is solved.

I know this is really old, but I had this same issue and have not seen a fix for it yet.

I am thinking this happened because I decided to turn off my BIND dns server within webmin, I was trying to use digitalocean for all my dns needs instead. I haven't tested whether this was the cause.

I contacted support and was given two things to do.

The first (did not work for me):

rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update 

The second (did work):
change nameserver to 8.8.8.8 and/or 8.8.4.4 in /etc/resolv.conf

Since I am using Virtualmin/ Webmin, I couldn't just change this file, so I had to do it within webmin. I changed it in two places:
a.
webmin>Networking>Network Configuration>Hostname and DNS Client
These were secondary to 127.0.0.1, so I just removed that one and moved these up on the list.
b.
webmin>Networking>Network Configuration>Host addresses
changed 127.0.0.1 to 8.8.8.8 where it coincides with my web address.

A simple reboot fixed the problem for me. I hope you are as lucky as me.

sudo reboot

I experienced the problem when I selected Ipv6 but when I created using Ipv4 , I didn't experience it.
I guess there is some problem in Ipv6 resolution

Same problem here, in Bangalore servers, tried all the answers, only thing fixed it for me was rebuilding my droplet using IP4 address.
Seems the problem is with IPv6 addresses.
Hope it helps...

Have another answer? Share your knowledge.