bash: ./Install: bad interpreter: No such file or directory

bash: ./Install: bad interpreter: No such file or directory

Post by Lore4815 » Fri, 12 Jul 2002 05:14:13



I'm attempting to install a linux program called pengaol (available at source
forge).  When I try to run the install script I get the following error (bash:
./Install: bad interpreter: No such file or directory).  I thought at first
that the problem wuz that for some reason it couldn't locate the file Install
however after reading a similar question I've learned that the problem could be
the first line of code in the file.  In this case it is !#/bin/sh.  If I type
ash on the command prompt it does switch to that shell but I do no for a fact
that there is no sh folder in bin.  Is this my problem?  If so how can I fix
it? If not what is my problem?  Please help me.  Send a responce to

 
 
 

bash: ./Install: bad interpreter: No such file or directory

Post by Michael Heimin » Fri, 12 Jul 2002 07:52:47



[..]

Quote:> error (bash:
> ./Install: bad interpreter: No such file or directory).  I thought
> at first that the problem wuz that for some reason it couldn't
> locate the file Install however after reading a similar question
> I've learned that the problem could be
> the first line of code in the file.  In this case it is !#/bin/sh.

Really, it should be #!/bin/sh or #!/bin/bash.

>  If I type ash on the command prompt it does switch to that shell
> but I do no for a fact
> that there is no sh folder in bin.  Is this my problem?  If so how
> can I fix
> it? If not what is my problem?  Please help me.  Send a responce
> to


Post here, read here.

Try:
$ echo $SHELL

put the output instead of #!/bin/sh, mostly #!/bin/bash, there is
no real sh on Linux,

Wonder how braindead the distro you are using is, or if it's a typo?

$ ls -al /bin/sh
lrwxrwxrwx    1 root     root      4 M?r 16  2001 /bin/sh -> bash

Just a symlink. (man ln)

Michael Heiming
--
Remove the +SIGNS case mail bounces.

 
 
 

bash: ./Install: bad interpreter: No such file or directory

Post by Cameron Simpso » Fri, 12 Jul 2002 10:16:34




| [..]
| > error (bash:
| > ./Install: bad interpreter: No such file or directory).  I thought
| > at first that the problem wuz that for some reason it couldn't
| > locate the file Install however after reading a similar question
| > I've learned that the problem could be
| > the first line of code in the file.  In this case it is !#/bin/sh.
|
| Really, it should be #!/bin/sh or #!/bin/bash.

Is it possible that you fetched this with FTP is ASCII mode, or got
it from a windows system somehow? Type this:

        sed 1q install | od -c

See if there's a trailing CR (^M, \015) char after the /bin/sh on that line.
This would indicate a DOS formatted text file. Which would indeed produce
this behaviour because they're trying to run "/bin/sh^M", not "/bin/sh".

Cheers,
--

Any profit should go to Arnie's `get the daemon carved on Mount Rushmore' fund.

 
 
 

1. bad interpreter: No such file or directory error

I realize this is usually caused by a bad file (ie, PC formatted or some
such) but that doesn't
seem to be whats going on, this has to be something stupid I'm doing... any
ideas?:

File:

-rwxrwxr-x    1 deployer deployer      299 Jun  3 11:35 start-mailer.sh

Contents:

#!/bin/sh
#export JAVA_OPTS="-Xms512m -Xmx1024m"
/usr/local/jboss/bin/run.sh -b mailer.hnw.com -c
mailer -Ddeploy.home=/www/deplo
yments/mailer/ -Djava.rmi.server.hostname=mailer.hnw.com -Djava.awt.headless=tru
e -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryIm
pl &

Output:

: bad interpreter: No such file or directory

Check for \015:

0000000   #   !   /   b   i   n   /   s   h  \r  \n
0000013


/bin/bash

lrwxr-xr-x    1 root     root            4 Mar  3 13:55 /bin/sh -> bash

2. Files in lost+found can not be deleted.

3. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

4. GCC Question

5. SEGV in NFS in deep directory (was: bash: looping over all files in directory)

6. How to recover from RH install crash

7. bash install -- no such file or directory?

8. open() on /proc file blocks

9. bad file descriptor in ksh but not in bash

10. "Bad file descriptor" with Bash; how to designate descriptors?

11. Cygwin bash cant see some files/directories

12. bash: 'XXX' no such file or directory

13. SSH cannot login , remote system say /bin/bash: no such file or directory