所以我使用以下命令安装了 dnsmasq
apt-get install dnsmasq
现在发生的事情是
root@kali:~# dnsmasq
bash: dnsmasq: command not found
root@kali:~# /etc/init.d/dnsmasq start
root@kali:~#
root@kali:~# service dnsmasq start
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
因此,我输入
root@kali:~# systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2019-10-30 01:59:14 IST; 52s ago
Process: 6132 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=203/EXEC)
Oct 30 01:59:14 kali systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Oct 30 01:59:14 kali systemd[6132]: dnsmasq.service: Failed to execute command: No such file or directory
Oct 30 01:59:14 kali systemd[6132]: dnsmasq.service: Failed at step EXEC spawning /usr/sbin/dnsmasq: No such file or directory
Oct 30 01:59:14 kali systemd[1]: dnsmasq.service: Control process exited, code=exited, status=203/EXEC
Oct 30 01:59:14 kali systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
Oct 30 01:59:14 kali systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
请帮忙。
答案1
解决办法是apt install dnsmasq-base
而不是apt install dnsmasq
。
在 Ubuntu 20.04 上测试。
dnsmasq-base
请参阅有关和之间的差异的其他帖子dnsmasq
,例如: