【发布时间】:2023-06-08 21:18:01
【问题描述】:
我正在尝试在我的 Raspberry Pi 上设置 DHCP 服务器。我尝试使用以下命令安装它:
sudo apt-get install isc-dhcp-server
并显示以下日志:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
icelib
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 302 not upgraded.
Need to get 0 B/887 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 61701 files and directories currently installed.)
Preparing to replace isc-dhcp-server 4.2.2.dfsg.1-5+deb70u6 (using .../isc-dhcp-server_4.2.2.dfsg.1-5+deb70u6_armhf.deb) ...
[FAIL] Stopping ISC DHCP server: dhcpd failed!
Unpacking replacement isc-dhcp-server ...
Processing triggers for man-db ...
Setting up isc-dhcp-server (4.2.2.dfsg.1-5+deb70u6) ...
[FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
当我打开 /var/log/syslog 文件时,它显示以下几行:
No subnet declaration for th0 (x.x.x.x)
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
In your dhcpd.conf file for the network segment
to which interface eth0 is attached. **
我是 linux 新手,所以我不知道我的系统出了什么问题,也不知道该去哪里。
感谢您的帮助。
【问题讨论】:
-
不幸的是,这与Stack Overflow 无关。投票结束
-
@talonmies 你能解释一下为什么跑题了吗?什么会让它成为话题?
-
@rhermans:没有什么能让它成为话题。在树莓派上设置 DHCP 服务器的说明与构建宜家平板电脑桌的说明一样直接与编程相关。
标签: linux raspberry-pi dhcp subnet