Penguin

Differences between version 40 and predecessor to the previous major change of CommonErrors.

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

Newer page: version 40 Last edited on Wednesday, March 8, 2006 10:12:06 am by JohnMcPherson Revert
Older page: version 37 Last edited on Saturday, March 19, 2005 11:44:12 am by MarcusTylutki Revert
@@ -10,50 +10,57 @@
  
  
 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. 
+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:  
+<verbatim>  
+ #!/usr/local/bin/perl  
+</verbatim>  
+ 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 edited 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. 
+ Another possibility is that the script was edited 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! 
+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! 
  
-Sometimes, missing libraries can cause ldd itself to fail, which can make it difficult to determine what the problem is. Eg: 
+ Sometimes, missing libraries can cause ldd itself to fail, which can make it difficult to determine what the problem is. Eg:  
+<verbatim>  
  $ ./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 
+</verbatim>  
  
-This makes diagnosis a bit harder! However, you can try: 
+ This makes diagnosis a bit harder! However, you can try:  
+<verbatim>  
  $ /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 
+</verbatim>  
+ or  
+<verbatim>  
  $ 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?) 
+</verbatim>  
+ 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 
+<verbatim>  
  Xlib: connection to ":0.0" refused by server 
  Xlib: Client is not authorized to connect to Server 
  some_app: unable to open display ":0.0" 
-  
+</verbatim>  
 The user running the command is different to the user that started the X-server, or is otherwise not allowed by the X server to create new (graphical) windows. 
  
 Also see the [XFree86Notes] page on giving other users permission to open graphical windows on your X server. 
  
@@ -71,33 +78,40 @@
  
 * This error occurred on my system on the /var directory because /dev/hda5 was mounted on /var with the option "noexec". This is also the case for [CDROM]s and floppy drives - by default in many distributions you can't run executables from removable media. (This is caused by the "user" mount option.) 
  
 * It is possible (but very unlikely) that /bin/bash (or whatever shell the script uses) isn't executable, and since it is a bash script the kernel is trying to start bash. 
+<verbatim>  
  chmod a+rx /bin/bash /usr/bin/perl /usr/local/bin/perl ''/path/to/your/script/here'' 
+</verbatim>  
 this will mark these all as executable and readable by everyone. 
  
 * It is possible that the interpreter being used is not runable, for example it has unresolved link dependencies as described earlier in the page. 
  
-* I got errors similar to this when my locale files were generated incorrectly (I was using [Debian] at the time) . Originally I thought I had suffered filesystem corruption, as the output of ls(1) was rubbish, and no text scripts would run, although binaries were fine . Specifically, the LC_CTYPE environment variable was defaulting to en_US.UTF -8 but locale -gen(8 ) had somehow generated the wrong encoding . Anyway, doing  
- LC_ALL=C ; export LC_ALL  
-changed it back to using ascii(7) characters, and my scripts ran again.  
+* Mandrake 9.1 using the secure kernel: this error occurs when the directory containing the script is world writable . e.g.: the script ~~/~MyDir/myscript .sh will give this error if the directory ~~/~MyDir is world - (or group -? )writable . chmod 700 ~~/~MyDir and try again :)  
  
-* Mandrake 9.1 using the secure kernel: this error occurs when the directory containing the script is world writable. e.g.: the script ~/!MyDir/myscript .sh will give this error if the directory ~/!MyDir is world- (or group-? )writable . chmod 700 ~/!MyDir and try again :)  
+* This error will occur when trying to execute a script if the mount point that the directory is in was mounted with the option "noexec" . See the mount (8 ) ManPage
  
 ---- 
 !!ping: unknown protocol icmp 
+<verbatim>  
  cobalt root # ping 
  ping: unknown protocol icmp. 
+</verbatim>  
 I googled for this, and only found suggestions to make sure /proc was mounted (which it was) and that my interfaces were correctly configured (which they were, and I dont see why this would matter). I asked GreigMcGill, and he suggested /etc/protocols issues: my /etc/protocols was fine, *BUT* my system had taken upon itself to declare my LDAP server as authoritative for protocols in /etc/nsswitch.conf: 
- protocols: ldap [ [NOTFOUND=return] files  
-Deleting the ldap portion (as I don't have protocols info in the LDAP tree) fixed 
+<verbatim>  
+ protocols: ldap [NOTFOUND=return] files  
+</verbatim>  
+Deleting the ldap portion (as I don't have protocols info in the LDAP tree) fixed this:  
+<verbatim>  
  protocols: files. 
-  
+</verbatim>  
  
 !!ping: sendto: Operation not permitted 
+<verbatim>  
  PING 192.168.66.10 (192.168.66.10): 56 data bytes 
  ping: sendto: Operation not permitted 
  ping: wrote 192.168.66.10 64 chars, ret=-1 
+</verbatim>  
 The interface you are pinging out of (192.168.66.10) is firewalled. Fix your firewall :) 
  
  
 ----