Penguin

Differences between version 22 and previous revision of CommonErrors.

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

Newer page: version 22 Last edited on Thursday, July 3, 2003 3:27:19 pm by JohnMcPherson Revert
Older page: version 21 Last edited on Monday, June 30, 2003 2:52:46 pm by JohnMcPherson Revert
@@ -5,13 +5,38 @@
  
 ---- 
 !!"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: 
-* 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: 
+  
+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. 
-* Your dynamic binary executable is linked 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  
-* More commonly this program is linked against a library that doesn 't exist on your machine . If all your programs are saying this , try echo /lib/*, you'll probably find it empty :
+  
+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  
+  
+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  
+ $ file ./ninfo  
+ ./ninfo: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses  
+ shared libs), not stripped  
+ $ ldd ./ninfo  
+ /usr/bin/ldd: ./ninfo: No such file or directory  
+  
+This makes diagnosis a bit harder! However, you can try:  
+ $ /lib/ld-linux.so.2 --verify --list ./ninfo  
+ /usr/local/bin/ninfo: error while loading shared libraries: libc.so.5: cannot  
+ open shared object file: No such file or directory  
+  
+or  
+ $ strings ./ninfo | grep '\.so'  
+ /lib/ld-linux.so.1  
+ libtermcap.so.2  
+ libc.so.5  
+  
+and it becomes clear that this program is linked against very old versions of libraries that don 't exist any more . The program needs to be re-compiled against current versions (you do have the source code , right?
  
 ---- 
  
 !!Xlib: connection to ":0.0" refused by server