Penguin

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

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

Newer page: version 18 Last edited on Wednesday, March 5, 2003 10:27:03 pm by JohnMcPherson Revert
Older page: version 15 Last edited on Thursday, February 27, 2003 10:46:45 am by JohnMcPherson Revert
@@ -2,9 +2,9 @@
  
 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"  
 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: 
  #!/usr/local/bin/perl 
 But if you had perl installed as /bin/perl or /usr/bin/perl you would get this message. 
@@ -19,24 +19,42 @@
 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 [XAuthNotes] page on giving other users permission to open graphical windows on your X server. 
  
-!!-bash: /path/to/script: /bin/bash: bad interpreter: Permission denied  
  
- -bash: /path/to/script: /bin/bash: bad interpreter: Permission denied  
  
-/bin/bash exists and runs fine; the probably cause is the "u+x" bit is not set on the script. (a+x should overwrite it, shouldn't it?)  
+!!-bash: /bin/bash: Permission denied: /path/to/program  
  
-My experimentation suggests that /bin/bash probably isn't executable, and since it is a bash script the kernel is trying to start bash. Judging by the number of people doing searchs we're having a large number of people have this problem with bash and perl. Still have no idea what's going on? try  
+!!bash: /path/to/script: /bin/bash: bad interpreter: Permission denied  
+  
+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):  
+* /bin/bash exists and runs fine; the probable cause is the program is a script and the "u+x" bit is not set on the script. ("chmod a+x program" would also set it.) Bash will report this even if the script is not a bash script - that is because bash has to first load and run the script, which is can't do.  
+  
+* 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. 
  chmod a+rx /bin/bash /usr/bin/perl /usr/local/bin/perl ''/path/to/your/script/here'' 
 this will mark these all as executable and readable by everyone. 
  
-'' It seems highly unlikely that you got into a user run-level if bash and/or perl aren't executable. Based on Plug's experience with linuxsms , it seems this is caused by the script being not executable by you , but set executable by group and/or other -- JohnMcPherson''  
+* 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.  
  
-This error occured on my system on the /var directory because /dev/hda5 was mounted on /var  
-with the option "noexec".  
  
 ---- 
+!!ping: unknown protocol icmp  
+ cobalt root # ping  
+ ping: unknown protocol icmp.  
+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  
+ protocols: files.  
+  
+  
 !!ping: sendto: Operation not permitted 
  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