解决Temporary failure in name resolution

1) Make sure your DNS Resolver config file is writable:
sudo chmod o+r /etc/resolv.conf

2) Temporarily change your DNS to use Google’s nameservers instead of DigitalOcean’s:
sudo nano /etc/resolv.conf

Change the IP address in the file to: 8.8.8.8
servername 8.8.8.8

Press CTRL+X to save the file.

点赞