启动的时候会出现
Job for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details.
我用这个systemctl status dnsmasq.service命令出现了这样的提示
root@raspberrypi:/# systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
└─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: failed (Result: exit-code) since Sun 2018-07-01 23:27:13 JST; 43s ago
Process: 4417 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=1/FAILURE)
Process: 4413 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Jul 01 23:27:13 raspberrypi dnsmasq[4413]: dnsmasq: syntax check OK.
Jul 01 23:27:13 raspberrypi dnsmasq[4417]: dnsmasq: junk found in command line
Jul 01 23:27:13 raspberrypi systemd[1]: dnsmasq.service: control process exited, code=exited status=1
Jul 01 23:27:13 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jul 01 23:27:13 raspberrypi systemd[1]: Unit dnsmasq.service entered failed state.
我的dnsmasq配置如下
root@raspberrypi:/# cat /etc/dnsmasq.conf
bind-interfaces
interface=wlan1
dhcp-range=192.168.150.2,192.168.150.10,12h
日志文件
Jul 1 06:21:59 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Jul 1 06:21:59 raspberrypi dnsmasq[1119]: dnsmasq: syntax check OK.
Jul 1 06:21:59 raspberrypi dnsmasq[1123]: dnsmasq: junk found in command line
Jul 1 06:21:59 raspberrypi dnsmasq[1123]: junk found in command line
Jul 1 06:21:59 raspberrypi dnsmasq[1123]: FAILED to start up
Jul 1 06:21:59 raspberrypi systemd[1]: dnsmasq.service: control process exited, code=exited status=1
Jul 1 06:21:59 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jul 1 06:21:59 raspberrypi systemd[1]: Dependency failed for Host and Network Name Lookups.
Jul 1 06:21:59 raspberrypi systemd[1]: Unit dnsmasq.service entered failed state.
有人知道该怎么办吗,我是想用树莓派建立一个热点的,就是这个dnsmasq不好用啊,我的配置什么的在ubuntu系统下成功运行起来了的,但是复制到树莓派上之后用ap-hotspot创建热点之后手机一直连不上wif,连接超时并且不能获得ip地址,我用的是外接的无线网卡,并没有用自带的网卡,外接网卡是waln1,是不是因为有双网卡不能用bind?我不是很清楚
运行sudo dnsmasq
然后出现了 dnsmasq:unknown interface wlan1 这样的返回
怎么办啊!!很急很急