柳罐罐 2018-06-30 21:00 采纳率: 30.8%
浏览 4235
已结题

树莓派3启动dnsmasq服务失败怎么办

启动的时候会出现
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 这样的返回
怎么办啊!!很急很急

  • 写回答

4条回答 默认 最新

  • dabocaiqq 2018-07-01 02:11
    关注
    评论

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况