i tried to install /etc/rc.local and i am stuck in this step
- 3,787
- 9
- 30
- 65
- 19
- 1
- 6
-
Please post text and not images. You can do copy&paste from your terminal into the text box for the question. – filbranden Nov 22 '18 at 18:56
-
i did that already :( – ChangEtheColours Nov 24 '18 at 13:19
2 Answers
The error you're getting is:
Failed to execute command: Exec format error
That means systemd is trying to execute /etc/rc.local as an executable (for instance, a shell script), but that is failing since it appears the /etc/rc.local file is not a valid executable.
Please take a look at its contents. If it's a script, do you have a proper "shebang" line, such as #!/bin/sh or #!/bin/bash at the beginning?
Does the file have the "executable" bit set? (You can set it with chmod +x /etc/rc.local).
Please edit your answer and include the output of commands ls -l /etc/rc.local and file /etc/rc.local, which will help identify the exact issue you're having.
UPDATE: From your comment below, looks like you were missing the shebang line #!/bin/bash in your /etc/rc.local, adding that line fixed the problem.
- 2,511
- 13
- 17
-
1@ChangEtheColours Please post the solution as proper answer. Comments don't allow for extensive formatting, and it's impossible to understand what exactly has been changed in the script. – Sergiy Kolodyazhnyy Nov 22 '18 at 23:14
systemctl status rc-local
FAILED
If I erase from
/etc/rc.local ***the***
/usr/bin/garbd --cfg /etc/garbd.conf &
exit 0
and save only with
#!/bin/bash
then I get this
[
- 69,223
- 56
- 216
- 327
- 19
- 1
- 6

