Failed at step EXEC spawning /usr/sbin/dnsmasq: No such file or directory

0

So what I did was, I installed dnsmasq using the command

apt-get install dnsmasq

Now, what happens is

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.

So, I typed

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.

Please help.

DeshBhakt

Posted 2019-10-29T20:32:05.797

Reputation: 175

Does /usr/sbin/dnsmasq exist? If not, try to reinstall it, or erase it and install it again. Look for the binary in the usual places, and put in a symlink to make it work, and complain to the provider. – stolenmoment – 2019-10-30T01:16:42.553

No it doesn't exist. I tried apt-get purge dnsmasq and then, reinstall it.. Didn't help – DeshBhakt – 2019-11-02T21:09:38.013

So, the problem is that the systemd unit file has the wrong path for the executable. Do "find / -name dnsmasq*". If that turns up the binary, edit the dnsmasq.service file (which that should also have found). Then try to start it again. – stolenmoment – 2019-11-04T13:36:42.897

1If there's no binary, then the package is utterly broken, and you should switch to a different repo, set of repos, or distro to find it. – stolenmoment – 2019-11-04T13:37:33.873

No answers