所以我在我的手机上安装了 linuxdeploy 来搞乱一个 debian linux。为 arm64 安装了 debian 9,到目前为止一切顺利。
只有当我运行任何“sudo”命令时,我才会收到以下警告:
sudo: unable to resolve host localhost: no such file or directory
(虽然我仍然获得root访问权限)
我一直在网上寻找,但没有找到任何人提供他的确切错误信息。
我检查了以下文件:
/etc/hosts,它包含 1 行:
127.0.0.1 localhost
/etc/hostname,它包含 1 行:
localhost
编辑:按照下面评论中的要求,我尝试运行命令:
grep hosts /etc/nsswitch.conf
导致:
no such file or directory
快速查看 /etc 文件夹确实表明该文件丢失
因此,感谢 roaima 的评论,我设法了解我缺少 /etc 文件夹中的 nsswitch.conf 文件。
虽然我不明白为什么文件丢失了,但在谷歌的帮助下我重建了文件如下:
然后重新启动系统,我的问题现在消失了。