I deleted both the resolvconf folder and the resolv.conf file in /etc by mistake, assuming that resolvconf was causing UCK to fail. Now the application has upgraded, fixing the issue, but it says no file named resolv.conf in /etc.
What it says is correct because I deleted those files. Is there any way to recreate the files or restore from another location?
Asked
Active
Viewed 1.9e+01k times
41
5 Answers
19
If resolvconf -u shows the WARNING that /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf then just backup that resolv.conf and make the symbolic link:
$ cd /etc
$ sudo ln -s /run/resolvconf/resolv.conf
luart
- 1,020
- 1
- 10
- 8
8
The accepted answer did not work for me. After reinstalling resolvconf, the system would completely wipe my resolv.conf file after each reboot.
To fix this, I had to reinstall the network-manager and libnss-resolve packages in addition to resolvconf.
Manually add a nameserver to resolve.conf (this is so you can fetch packages from the Ubuntu repos):
-
sudo vi /etc/resolv.conf - Add
nameserver 8.8.8.8to the file.
-
Reinstall the
network-manager,libnss-resolve, andresolvconfpackages:apt install --reinstall resolvconf network-manager libnss-resolve
mthrl
- 81
6
Try this:
nano /etc/resolv.conf
add:
nameserver 8.8.8.8
nameserver 192.168.x.x
(check your ifconfig output for the correct address)
then
sudo service resolvconf start
sudo systemctl enable resolvconf
Zanna
- 72,312
user767627
- 61