Re: Error in script "invalid interpreter"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 Oct 2005, Mike McCarty wrote:

I'm trying to install lcc (compiler) from source, and encountered
an error which I don't understand. During the install, a script
is executed which fails. I've stripped off non-essential stuff...

$ env src/run.sh
env: src/run.sh: Permission denied
$ pwd
/mnt/cdrom/lcc/4.2
$ ls -ld .
dr-xr-xr-x  14 root root 4096 Oct 14 15:50 .
$ ls -ld src
dr-xr-xr-x  2 root root 6144 Oct 14 15:50 src
$ ls -ld src/run.sh
-r-xr-xr-x  1 root root 1586 Jul  2  1997 src/run.sh
$ ./src/run.sh
bash: ./src/run.sh: /bin/sh: bad interpreter: Permission denied
$ dumphex src/run.sh


00 23 21 2F 62  69 6E 2F 73  68 0A 23 20  24 49 64 3A |#!/bin/sh.# $Id:|
10 20 72 75 6E  2E 73 68 2C  76 20 31 2E  31 31 20 31 | run.sh,v 1.11 1|
20 39 39 37 2F  30 37 2F 30  33 20 30 30  3A 31 35 3A |997/07/03 00:15:|
30 31 30 20 64  72 68 20 45  78 70 20 24  0A 23 20 72 |10 drh Exp $.# r|
40 75 6E 20 2E  2E 2E 2F 74  61 72 67 65  74 2F 6F 73 |un .../target/os|
50 2F 74 73 74  2F 66 6F 6F  2E 73 20 5B  20 72 65 6D |/tst/foo.s [ rem|
60 6F 74 65 68  6F 73 74 20  5D 0A 0A 23  20 73 65 74 |otehost ]..# set|


...


$ ls -ld /bin/sh
lrwxrwxrwx  1 root root 4 Oct 20  2004 /bin/sh -> bash
$ ls -ld /bin/bash
-rwxr-xr-x  1 root root 593304 Mar 11  2004 /bin/bash
$ /bin/sh
sh-2.05b$ exit
exit
$


I thought at first that it might be the infamous MSDOS CRs at the
ends of the lines, but the hex dump proves otherwise. The link
/bin/sh exists, and has correct permissons, as does the file
/bin/bash. It even runs.

Can anyone lend me a clue? I have't got any.
shot in the dark. Are you running this from your home directory which is
mounted via nfs and has the noexec flag set ?





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux