sudo error unable to resolve host locahost (using linuxdeploy on android device)
1
vote
1
answer
843
views
So I installed linuxdeploy on my phone to mess around with a debian linux. Installed debian 9 for arm64 and so far so good.
Only when I run any "sudo" command, I'm getting the following warning:
sudo: unable to resolve host localhost: no such file or directory
(I still get the root access though)
I've been looking on the web but did not find anyone with his exact error message.
I checked the following files:
/etc/hosts, it contains 1 line:
127.0.0.1 localhost
/etc/hostname, it contains 1 line:
localhost
Edit: as per asked in the comments below, I tried to run the command:
grep hosts /etc/nsswitch.conf
resulting in:
no such file or directory
A quick look at /etc folder indeed shows that this file is missing
Asked by Marc
(155 rep)
Oct 30, 2018, 03:04 PM
Last activity: Jul 25, 2021, 02:48 AM
Last activity: Jul 25, 2021, 02:48 AM