Bizarre error while ./configure-ing PIL

Michael Hudson mwh21 at cam.ac.uk
Thu Jun 3 08:27:00 CEST 1999


Jo Meder <jo at delorges.in-berlin.de> writes:

> Michael Hudson <mwh21 at cam.ac.uk> writes:
> 
> > Matt Gushee <mgushee at ime.net> writes:
> 
> [reasonable permissions for ./configure]
> > > bash: ./configure: Permission denied
> 
> > Random guess, but check the first line of ./configure. It should
> > probably read
> > 
> > #!/bin/sh
> > 
> > My guess is either 1) /bin/sh is not executable (very unlikely, all
> > sorts of things would barf at that) 2) the line's gotten mangled
> > somehows - maybe a misplaced space?
> 
> Actually the line reads
> 
> #! /bin/sh
>   ^note the space
> 
> but why this should lead to "Permission denied", I don't know. 
> 
> I tried it with tcsh, zsh, bash, ksh, ash and not one of them barfed
> at the line.

Well, the shell's not getting to see the line (if a shell sees the
line, it sees the # and thinks it's a comment.

It's the kernel that's getting confused. I don't know what the space
between the ! and the / does, but if it reads

#!/bin/ sh

the kernel tries to execute /bin/, finds it's a directory and
complains. Having a space between ! and / works on my system (RedHat
6.0 + kernel 2.2.9).

Also if the executable isn't there you get very bizarre messages:

[mwh21 at atrus mwh21]$ cat > shellscript.sh
#!/bin/frumble
frub
[mwh21 at atrus mwh21]$ chmod u+x shellscript.sh
[mwh21 at atrus mwh21]$ ls shellscript.sh
shellscript.sh
[mwh21 at atrus mwh21]$ ./s
shellscript.sh  src
[mwh21 at atrus mwh21]$ ./shellscript.sh
bash2: ./shellscript.sh: No such file or directory
[mwh21 at atrus mwh21]$ 

Leading to the "what the f.? the file's there you stupid machine"
response.

Michael





More information about the Python-list mailing list