2

i tried to install /etc/rc.local and i am stuck in this step

terminal pic

slava
  • 4,085

2 Answers2

6

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.

filbranden
  • 2,861
0
systemctl status rc-local

FAILED

screenshot from terminal

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

[screenshot from *terminal*

Zanna
  • 72,312