Linux Return Error Code 127
Contents |
>ExampleComments1Catchall for general errorslet "var1 = 1/0"Miscellaneous errors, such as "divide by zero" and
Exit Code 127 Linux
other impermissible operations2Misuse of shell builtins (according linux exit codes to Bash documentation)empty_function() {}Missing keyword or command, or permission problem (and diff return
Program Exited With Status 127 In Shell Script
code on a failed binary file comparison).126Command invoked cannot execute/dev/nullPermission problem or command is not an executable127"command not exit code 137 found"illegal_commandPossible problem with $PATH or a typo128Invalid argument to exitexit 3.14159exit takes only integer args in the range 0 - 255 (see first footnote)128+nFatal error signal "n"kill -9 $PPID of script$? returns 137 (128 + 9)130Script terminated by Control-CCtl-CControl-C is fatal error signal 2, (130 = 128 + 2, see above)255*Exit status out of rangeexit -1exit takes only integer args in the range 0 - 255
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting
Exit Code 255 Windows
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join autosys exit codes the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a
Exited With Return Code 127
minute: Sign up 127 Return code from $? up vote 108 down vote favorite 8 What is the meaning of return value 127 from $? in UNIX. process unix share|improve this question asked Nov 19 '09 at 13:05 Sachin Chourasiya http://tldp.org/LDP/abs/html/exitcodes.html 4,857196487 add a comment| 5 Answers 5 active oldest votes up vote 166 down vote accepted Value 127 is returned by /bin/sh when the given command is not found within your PATH system variable and it is not a built-in shell command. In other words, the system doesn't understand your command, because it doesn't know where to find the binary you're trying to call. share|improve this answer edited Jan 2 '13 at 8:34 answered Nov 19 '09 at 13:08 Oldskool 19.2k63156 11 http://stackoverflow.com/questions/1763156/127-return-code-from This also happens if a bash script does not have mode "+x" but does indeed exist. –MatthewKremer Mar 4 '14 at 20:48 You can try using which [program] to see which binary the OS is using. If it comes up empty, next step is checking execution bit and PATH. –cr125rider Jun 12 '14 at 16:33 5 @cr125rider, which is not particularly accurate -- it doesn't know about aliases, shell functions, PATH lookup memoization, or other factors internal to shell state. Much better to use type, a shell builtin which knows about all of those things. –Charles Duffy Sep 11 '14 at 22:45 I didn't know about type, thanks –cr125rider Sep 15 '14 at 20:13 This also happened to me with a file that had Windows line feeds. Correcting the line endings to unix format solved the problem –Mitkins Sep 30 '14 at 1:35 | show 1 more comment up vote 12 down vote Generally it means: 127 - command not found but it can also mean that the command is found, but a library that is required by the command is NOT found. share|improve this answer edited Aug 25 at 9:56 answered Jul 23 '13 at 21:34 okigan 63611025 add a comment| up vote 6 down vote It has no special meaning, other than that the last process to exit did so with an exit status of 127. However, it is also used by bash (assumin
Exit Codes
Exit Code NumberMeaningExampleComments1catchall for general errorslet "var1 = 1/0"miscellaneous errors, such as "divide by zero"2misuse of shell builtins, according to Bash http://www.museum.state.il.us/ismdepts/library/linuxguides/abs-guide/exitcodes.html documentationSeldom seen, usually defaults to exit code 1126command http://unix.stackexchange.com/questions/242111/using-reserved-codes-for-exit-status-of-shell-scripts invoked cannot executepermission problem or command is not an executable127"command not found"possible problem with $PATH or a typo128invalid argument to exitexit 3.14159exit takes only integer args in the range 0 - 255128+nfatal error signal "n"kill -9 $PPIDof script$? returns 137 (128 + 9)130script terminated by Control-CControl-C is fatal error signal 2, (130 = 128 + 2, see above)255exit status out of rangeexit -1exit takes only integer args in the range 0 - 255