当我在 Kali Linux 上安装 bind9 时,无法启动或停止它。当用systemctl status bind9.service
它来查看状态时,我看到消息说找不到 Unit bind9.service。
root@sarvdata:~# systemctl status bind9.service
Unit bind9.service could not be found.
我再次安装bind9
root@sarvdata:~# sudo apt install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
bind9 is already the newest version (1:9.18.16-1).
The following packages were automatically installed and are no longer required:
libbind9-161 libdns1107 libisc1104 libisccc161 libisccfg163 liblwres161
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1648 not upgraded.
但它无法解决我的问题。我尝试在其他 Linux 发行版(如 ubuntu 和 debian)上使用它,它运行正常。但在 Kali Linux 上却不起作用...
答案1
错误信息显示:
Unit bind9.service could not be found.
这意味着systemd
无法找到单元文件。这意味着您必须创建、链接或复制单元文件,或者以bind9
其他方式启动;最有可能/etc/init.d/bind9 start
。
答案2
在 Kali linux 上 bind9 的服务被称为“named”,而不是“bind9”
所以你需要做:
systemctl status named