0

For no apparent reason my Ubuntu suddenly stopped letting me install apts for example sudo apt-get update gets this response:

Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Could not resolve 'security.ubuntu.com'
Err:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Could not resolve 'us.archive.ubuntu.com'
Err:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Could not resolve 'us.archive.ubuntu.com'
Err:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Could not resolve 'us.archive.ubuntu.com'

Some answers suggested adding namespace 8.8.8.8 and 8.8.8.4 to resolv.conf as a first step however I cannot edit that file as it is a linked file type. I cannot modify it no matter what I do...

Using Ubuntu 68ubuntu1~18.04.1 on VMware partition of PC. This is a private install. Not an organization Can anyone help? Thanks!

DanW
  • 1
  • 3
    To start with, 1) which version of Linux have you installed  (Ubuntu server, Ubuntu desktop, Kubuntu, Lubuntu, Xubuntu, Ubuntu MATE, et al.) , and 2) which release number? 3) Reboot the OS. Does the problem persist after a reboot? Please click [edit] and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our channel to you. All facts about your system should go in the Question with [edit] – K7AAY Apr 03 '20 at 15:39
  • Welcome! In addition to @K7AAY comment, can you specify if this is a private or an organization network? Are you able to manually browse from a browser to that url? "Could not resolve x" error usually means your client was unable to reach a dns, or the dns has no record of such url, usually due to network related errors / changes. – Pizza Apr 03 '20 at 15:53
  • does ping google.com work? what about ping 8.8.8.8 – Aven Desta Apr 03 '20 at 16:05
  • ping google does not work … but have punted on this … did a complete reinstall of Ubuntu and problem went away for now. But the downside is I may never know what I did to cause this or fix it. – DanW Apr 04 '20 at 16:34
  • Related: https://askubuntu.com/q/1169657/968501 – Raffa Apr 04 '20 at 17:00

1 Answers1

0

The problem is your DNS, the DNS is configured in your resolv.conf, if this file 'dont exit' but is pointing to another file is not a problem, mine is too check with ls -ltr /etc/resolv.conf mine is pointing like that /etc/resolv.conf -> ../run/resolvconf/resolv.conf add in this file this line nameserver 1.1.1.1

So basically... only need to run: sudo echo "nameserver 1.1.1.1" >> /etc/resolv.conf

Caus
  • 1