Penguin

Differences between version 30 and previous revision of CommonErrors.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 30 Last edited on Thursday, June 10, 2004 6:40:03 pm by JohnMcPherson Revert
Older page: version 29 Last edited on Thursday, June 10, 2004 4:11:09 pm by BenBotto Revert
@@ -3,18 +3,25 @@
 This occurs when it can't load a shared library, use "ldd(1)" to determine which libraries this program is trying to link against and which ones are missing or can't be linked against. eg: 
  ldd /bin/cat 
  
 ---- 
-!!"No such file or directory" 
+!!"No such file or directory" or "Bad interpreter: no such file or directory"  
+  
+  
 If you see this message when trying to run a program, even though you can plainly see it right in front of you, there are a couple of possibilities: 
  
 ;1) Executable is a script: 
 If it is some kind of script, it might point to an interpreter that doesn't exist on your system. For example, it used to be common to see perl scripts whose first line was: 
  #!/usr/local/bin/perl 
 But if you had perl installed as /bin/perl or /usr/bin/perl you would get this message. 
+  
+Another possibility is that the script was editted on windows, or another  
+editor that added windows' style line endings (carriage-return + linefeed).  
+Try using "dos2unix" or "tr -d '\r'" to go back to normal newline (linefeed  
+only) line endings.  
  
 ;2) Executable is a binary: 
-Your dynamic binary executable is linked against a library that doesn't exist, or against a specific dynamic library on your system that has the same name (but different binary interfaces??) as the machine that the file was compiled on. This is particularly annoying as you can also get this message when trying to use ldd(1) to find out which dynamic library is causing the problem! If ldd(1) doesn't work, you are probably missing /lib/ld.so or /lib/ld-linux.so  
+Your dynamic binary executable is linked against a library that doesn't exist, or against a specific dynamic library on your system that has the same name (but different binary interfaces??) as the machine that the file was compiled on. This is particularly annoying as you can also get this message when trying to use ldd(1) to find out which dynamic library is causing the problem! 
  
 Sometimes, missing libraries can cause ldd itself to fail, which can make it difficult to determine what the problem is. Eg: 
  $ ./ninfo 
  zsh: no such file or directory: ./ninfo 
@@ -53,10 +60,8 @@
  
 !!-bash: /bin/bash: Permission denied: /path/to/program 
  
 !!bash: /path/to/script: /bin/bash: bad interpreter: Permission denied 
-  
-The error "Bad interpreter: no such file or directory" happend after opening my firewall script in windows with notepad, because windows uses Carriage Return <CR>. I use MonMotha's script, and after editing it with notepad it would no longer work in red hat. After re-downloading the script it ran fine.  
  
 Note that other shells (such as zsh(1)) don't give the "bad interpreter" part of the message for some of the following circumstances - only bash(1) seems to. 
  
 Possible causes for this message (in decreasing order of probability):