【发布时间】:2016-03-16 15:13:06
【问题描述】:
我试图在 pi 启动时运行一个简单的 C 代码,所以我按照文档 (https://www.raspberrypi.org/documentation/linux/usage/rc-local.md) 上的步骤进行操作,但是当我启动它时,它显示此错误:
Failed to start etc/rc.local compatibility.
See 'systemctl status rc-local.service' for details.
我按照它说的去做,我收到了这个:
rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; static)
Drop-In: /etc/systemd/system/rc-local.service.d
ttyoutput.conf
Active: failed (Result: exit-code) since Tue 2015-12-08 10:44:23 UTC; 2min 18s ago
Process: 451 ExecStart=/etc/rc.local start (code=exit, status=203/EXEC)
我的 rc.local 文件如下所示:
./home/pi/server-starter &
exit 0
谁能告诉我我做错了什么?
【问题讨论】:
-
你
systemctl enable rc-local.service了吗?当你systemctl start rc-local.service已经运行时会发生什么? (这会改变systemctl status rc-local.service的输出吗?) -
是的,当我这样做时,它会显示我在这里输入的信息,在“我按照它说的做......”之后。
标签: c linux raspbian raspberry-pi2