Ubuntu 16.04.1 apt-get update error

I get error when apt-get update how to resolve this problem?

Err:1 xenial-security InRelease
  Could not resolve ''
Err:2 xenial InRelease
  Could not resolve ''
Err:3 xenial-updates InRelease
  Could not resolve ''
Err:4 xenial-backports InRelease
  Could not resolve ''
Reading package lists... Done
W: Failed to fetch  Could not resolve ''
W: Failed to fetch  Could not resolve ''
W: Failed to fetch  Could not resolve ''
W: Failed to fetch  Could not resolve ''
W: Some index files failed to download. They have been ignored, or old ones used instead.

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Same problem as well. How can we solve this?

If you run into this issue remember to check, amongst other things, that you have not configured UFW or the DO Cloud Firewall to block outgoing http/https. I had done this accidentally and only realized it when I tried to do apt-get install for something

Correct nameserver in /etc/resolv.conf and ping works for and - However still struggling with

W: The repository ' xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.

on sudo apt-get update