Question

Could not resolve mirrors.digitaloccean.com

  • Posted September 11, 2014

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?

Subscribe
Share

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.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi,

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

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

Changing file permissions on resolv.conf fixed it for me on a newly restored droplet with Debian 10.

chown root:root /etc/resolv.conf
chmod 644 /etc/resolv.conf

see what is your firwall doing… sudo ufw status numbered

make sure you are not blocking your outband traffect to any of http://mirrors.digitalocean.com and http://security.ubuntu.com sites.

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…

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

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

sudo reboot

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.

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