What does the error mean?
DNS is like a phone book for the internet. It turns a name such as archive.ubuntu.com into a number that computers understand. When you run apt update, your server looks up that name. If the phone book is not reachable, you get "Temporary failure resolving".
Steps
- Log in to your server over SSH.
- Check that the internet itself works. Ping a public number address.
ping -c 3 8.8.8.8
This sends three small test messages. If you get replies, the connection is fine and DNS is the problem. If not, the network is down. Open a ticket with Hostvento support.
- Now test a name.
ping -c 3 archive.ubuntu.com
If this fails while the first one worked, DNS is broken.
- Look at your DNS settings file.
cat /etc/resolv.conf
This prints the list of DNS servers. It should have at least one line starting with nameserver.
- Back up the file with
cp /etc/resolv.conf /etc/resolv.conf.bak. - Open it with
nano /etc/resolv.conf. - Add these lines. They are free public DNS servers run by Google and Cloudflare, not by Hostvento.
nameserver 8.8.8.8
nameserver 1.1.1.1
- Save the file.
- Run
apt updateagain.
If the fix does not last
On newer Ubuntu, a service called systemd-resolved may rewrite /etc/resolv.conf. Your edit then disappears after a restart. Check its state with this command.
systemctl status systemd-resolved
This shows if the service is running. Set the DNS in the network settings file under /etc/netplan/ instead. Add a nameservers: block with addresses: [8.8.8.8, 1.1.1.1], then run netplan apply. Be careful with spacing, because the file is picky. Back it up first.
Quick recap
- The error means DNS cannot turn the name into a number.
- Test ping to 8.8.8.8 first, then to the name.
- Add working nameserver lines to /etc/resolv.conf.
- Use netplan if the file keeps resetting.