7

I was getting dns probe finished message in chrome on Ubuntu 18.04 so I looked up on the internet and tried to run the following commands.

sudo rm/etc/resolv.conf
sudo ln -s /var/run/resolvconf/resolv.conf /etc/resolv.conf

Above 2 commands executed successfully but the following didn't.

sudo resolvconf -u

It gives an error message that resolvconf is not installed.

Now, nothing is working and /etc/resolv.conf file is empty. I'm not even able to edit it (I tried to a add nameserver 8.8.8.8).

Please help.

Edit: i'm still getting ERR_NAME_NOT_RESOLVE and here's the output of 'service --status-all`.

 [ + ]  acpid
 [ - ]  alsa-utils
 [ - ]  anacron
 [ + ]  apparmor
 [ + ]  apport
 [ + ]  avahi-daemon
 [ + ]  bluetooth
 [ - ]  console-setup.sh
 [ + ]  cron
 [ + ]  cups
 [ + ]  cups-browsed
 [ + ]  dbus
 [ - ]  dns-clean
 [ + ]  gdm3
 [ + ]  grub-common
 [ - ]  hwclock.sh
 [ + ]  irqbalance
 [ + ]  kerneloops
 [ - ]  keyboard-setup.sh
 [ + ]  kmod
 [ + ]  network-manager
 [ + ]  networking
 [ - ]  plymouth
 [ - ]  plymouth-log
 [ - ]  pppd-dns
 [ + ]  procps
 [ - ]  rsync
 [ + ]  rsyslog
 [ - ]  saned
 [ + ]  speech-dispatcher
 [ - ]  spice-vdagent
 [ + ]  udev
 [ + ]  ufw
 [ + ]  unattended-upgrades
 [ - ]  uuidd
 [ + ]  whoopsie
 [ - ]  x11-common
आनंद
  • 205
  • 1
  • 3
  • 7

2 Answers2

8

To fix this you should recreate the link how it was. On 18.04 /etc/resolv.conf points to ../run/systemd/resolve/stub-resolv.conf.

So to fix your problem it should be enough to do the following:

sudo rm resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Videonauth
  • 33,045
  • 16
  • 104
  • 120
  • In my native 18.04 I have `/etc/resolv.conf -> ../run/resolvconf/resolv.conf`, in my VirtualBox 18.04 I have the link like you wrote. My native 18.04 is an upgrade from 17.10 but the VB system was a fresh install - perhaps this explains the difference? – muclux May 27 '18 at 09:23
  • Probably. This 18.04 I have here was a total fresh install, so I guess too that your different linkage is due to being an upgraded system. – Videonauth May 27 '18 at 09:25
  • @Videonauth Thanks. But I'm still occasionally getting ERR_NAME_NOT_RESOLVED. What should I do? I googled and found this answer https://askubuntu.com/questions/1029603/no-internet-connection-after-update-17-04-to-18-04 The output of `sudo service --status-all` is added in question. – आनंद May 27 '18 at 10:31
  • Did you restart the machine after the repair? – Videonauth May 27 '18 at 14:13
  • Yes, I did. But I continue to get the same message of DNS BAD CONFIG – आनंद May 30 '18 at 18:13
0

I had exactly the same issue and just removed the resolv.conf file by using the same commands! here is how I fixed it: if you are using gnome, then: sudo service network-manager restart this will recreate all the necessary files automatically.