systemd "code=exited, status=5/NOTINSTALLED": cause and fix
status=5/NOTINSTALLED means the service program, usually a start script, exited with code 5, "not installed". Find its exit 5 check and its journal lines.
Nov 16 23:47:28 server1 systemd[1]: myapp.service: Main process exited, code=exited, status=5/NOTINSTALLEDstatus=5/NOTINSTALLED means the service program exited with code 5. systemd did not decide that a file is missing. The program returned "something I need is not installed" itself, so the cause is a check inside that program, usually the wrapper or start script that ExecStart= points to.
Code 5 comes from the LSB (Linux Standard Base) exit codes for init scripts: 5 is "program is not installed", 6 is "program is not configured". The systemd.exec manual lists the same table, and the codes systemd itself uses when it fails before running the program are in a separate table of 200 and up. For the generic exit code 1, see systemd status=1/FAILURE: find the cause. The output below is real output from systemd 255 in a container, and … marks trimmed lines.
[1] Read status and the journal, and look for the lines the program wrote.
# systemctl start myapp; echo "rc=$?"# systemctl status myapp --no-pagerrc=0…× myapp.service… Process: 123 ExecStart=/usr/local/bin/myapp-wrapper (code=exited, status=5)…Nov 16 23:47:28 server1 myapp-wrapper[123]: myapp-wrapper: /usr/local/sbin/mydaemon is not installedNov 16 23:47:28 server1 systemd[1]: myapp.service: Main process exited, code=exited, status=5/NOTINSTALLED…The Process: line shows only status=5. The /NOTINSTALLED name appears on the Main process exited journal line. The line tagged with the program name, myapp-wrapper[123]:, is the cause. A program that logs only to its own file may leave no such line; then follow steps [3] and [4] of the status=1 article.
[2] Find where the script returns 5. Open the file ExecStart= points to and search for exit 5.
# systemctl cat myapp --no-pager | grep ^ExecStart=# grep -n "exit 5" /usr/local/bin/myapp-wrapper# /usr/local/bin/myapp-wrapper; echo "exit=$?"ExecStart=/usr/local/bin/myapp-wrapper…2:[ -x /usr/local/sbin/mydaemon ] || { echo "myapp-wrapper: /usr/local/sbin/mydaemon is not installed" >&2; exit 5; }…myapp-wrapper: /usr/local/sbin/mydaemon is not installedexit=5The script tested the executable with [ -x file ] and the test failed. If a manual run prints the same line and exit=5, the problem is not the systemd configuration: the file is missing at that path or is not executable. Install the package, or correct the path in the script. [3] If the same script returns 6, "configuration" is missing rather than the program. Put the executable in place (here, mydaemon was a fake program that runs sleep) and start again. Wait one second so the state has settled.
# systemctl reset-failed myapp# systemctl start myapp; echo "rc=$?"; sleep 1# systemctl status myapp --no-pager | grep -E "Process:|Main PID:"rc=0… Process: 135 ExecStart=/usr/local/bin/myapp-wrapper (code=exited, status=6) Main PID: 135 (code=exited, status=6)The script returns 6 when the config file /etc/myapp/myapp.conf is missing. After creating the file, reset-failed and a new start brought the service up (Main PID shows sleep because the test program is a fake).
[4] If the service was generated from an old SysV init script in /etc/init.d/, a 5 may not show up as a failure at all. A generated mark on the Loaded: line means this applies.
# systemctl start myinit; echo "rc=$?"# systemctl status myinit --no-pager# systemctl cat myinit --no-pager | grep -E "^(ExecStart|SuccessExitStatus)="rc=0…● myinit.service - LSB: demo init script Loaded: loaded (/etc/init.d/myinit; generated) Active: active (exited) since Mon 2026-11-16 23:47:30 UTC; 13ms ago… Process: 150 ExecStart=/etc/init.d/myinit start (code=exited, status=5)…Nov 16 23:47:30 server1 myinit[150]: myinit: /usr/sbin/mydaemon not installedNov 16 23:47:30 server1 systemd[1]: Started myinit.service - LSB: demo init script.…SuccessExitStatus=5 6ExecStart=/etc/init.d/myinit startThe script exited with 5, yet the unit is active (exited) and says Started. In this container the unit that systemd generated from the init script carried SuccessExitStatus=5 6, and per the manual that setting makes those exit codes count as success (the code keeps its name, 5/NOTINSTALLED). A service that looks up may have no program running. Check the process with ps, or run /etc/init.d/myinit start; echo $? and read the exit code yourself.
[5] If the file ExecStart= points to does not exist, you get 203/EXEC, returned by systemd itself, not 5 (confirmed in the same container as Process: … (code=exited, status=203/EXEC)). See systemd status=203/EXEC: cause and fix.
[6] After the fix, clear the failure record and start again. If you edited a unit file, run daemon-reload first.
# systemctl daemon-reload# systemctl reset-failed myapp# systemctl start myappAnalyze your syslog · journal log in the browser ↗ — nothing is uploaded.