Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/bin/bash/ bad interpreter
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Thu Jul 18, 2002 9:29 pm    Post subject: Reply with quote

One possibility is that you may have a bad character like a ^M in the file after /bin/sh. Can you do:
Code:

od -c configure

and see whether you see something like "\r\n"?

lordamok wrote:
chmod 755 /lib/ld*.so
root@trinity gtk-imonc-0.1.6 # ./configure
bash: ./configure: /bin/sh: bad interpreter: Permission denied
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Thu Jul 18, 2002 9:29 pm    Post subject: Reply with quote

lordamok wrote:
chmod 755 /lib/ld*.so
root@trinity gtk-imonc-0.1.6 # ./configure
bash: ./configure: /bin/sh: bad interpreter: Permission denied

Rats! Can you check that all the libraries listed as dependencies of
Code:
# ldd /bin/bash
have their execute bits set also?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Thu Jul 18, 2002 9:33 pm    Post subject: Reply with quote

What happens if you specify the explicit path? Instead of say

Code:
cd /home/user
./configure


you might try running

Code:
/home/user/configure


Does that also give you errors?

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Thu Jul 18, 2002 9:40 pm    Post subject: Reply with quote

The fact that he is in a bash shell (as evidenced by "bash:..." error message indicates that it is probably not a problem with bash itself. I think it is a bad character in the she-bang line (due to the file being transfered from Windows?)
Back to top
View user's profile Send private message
xorbe
n00b
n00b


Joined: 19 Jul 2002
Posts: 46
Location: near San Jose, CA

PostPosted: Fri Jul 19, 2002 5:36 am    Post subject: Try 755 on /bin/bash? Reply with quote

My /bin/bash has permissions 755. Perhaps Bash
won't run if it is world-writable? :?:
Back to top
View user's profile Send private message
lordamok
n00b
n00b


Joined: 17 Jul 2002
Posts: 28

PostPosted: Fri Jul 19, 2002 10:07 am    Post subject: Reply with quote

ldd /bin/bash
libncurses.so.5 => /lib/libncurses.so.5 (0x40029000)
libdl.so.2 => /lib/libdl.so.2 (0x40070000)
libc.so.6 => /lib/libc.so.6 (0x40074000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)



/home/lordamok/progs/gtk-imonc-0.1.6/configure
bash: /home/lordamok/progs/gtk-imonc-0.1.6/configure: /bin/sh: bad interpreter: Permission denied



:cry:
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri Jul 19, 2002 11:20 am    Post subject: Reply with quote

What does "od -c configure" give you (the first few lines)?
Back to top
View user's profile Send private message
lordamok
n00b
n00b


Joined: 17 Jul 2002
Posts: 28

PostPosted: Fri Jul 19, 2002 12:21 pm    Post subject: Reply with quote

od -c configure
0000000 # ! / b i n / s h \n \n # G u
0000020 e s s v a l u e s f o r s
0000040 y s t e m - d e p e n d e n t
0000060 v a r i a b l e s a n d c r
0000100 e a t e M a k e f i l e s . \n
0000120 # G e n e r a t e d a u t o
0000140 m a t i c a l l y u s i n g
0000160 a u t o c o n f v e r s i o n
0000200 2 . 1 3 \n # C o p y r i g
0000220 h t ( C ) 1 9 9 2 , 9 3 ,
0000240 9 4 , 9 5 , 9 6 F r e e
0000260 S o f t w a r e F o u n d a
0000300 t i o n , I n c . \n # \n # T
0000320 h i s c o n f i g u r e s c
0000340 r i p t i s f r e e s o f
0000360 t w a r e ; t h e F r e e
0000400 S o f t w a r e F o u n d a t
0000420 i o n \n # g i v e s u n l i
0000440 m i t e d p e r m i s s i o n
0000460 t o c o p y , d i s t r i
0000500 b u t e a n d m o d i f y
0000520 i t . \n \n # D e f a u l t s :
0000540 \n a c _ h e l p = \n a c _ d e f
0000560 a u l t _ p r e f i x = / u s r
0000600 / l o c a l \n # A n y a d d
0000620 i t i o n s f r o m c o n f
0000640 i g u r e . i n : \n a c _ h e l
0000660 p = " $ a c _ h e l p \n - -
0000700 w i t h - g t k - p r e f i x =
0000720 P F X P r e f i x w h e
0000740 r e G T K i s i n s t a l
0000760 l e d ( o p t i o n a l ) " \n
0001000 a c _ h e l p = " $ a c _ h e l
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri Jul 19, 2002 12:37 pm    Post subject: Reply with quote

Oops, forgot the most basic. What are the permissions on configure itself? "ls -l configure". This may be due to non execute bits on configure. On my box, not having execute bits on configure gives me the exact same error.
Back to top
View user's profile Send private message
rhialto
n00b
n00b


Joined: 13 Jul 2002
Posts: 43
Location: Roermond - The Netherlands

PostPosted: Fri Jul 19, 2002 1:40 pm    Post subject: Reply with quote

are you trying to run this script from a filesystem you mounted with the "noexec" flag? I got the same error when I tried to do a ./configure from my $HOME/work dir which is a symlink to the noexec file system /tmp..
_________________
Adopt an unanswered post today!
Back to top
View user's profile Send private message
lordamok
n00b
n00b


Joined: 17 Jul 2002
Posts: 28

PostPosted: Fri Jul 19, 2002 2:37 pm    Post subject: Reply with quote

the permissions if the script are set to 777

the partition iss mountet correctly to exec any other commands
Back to top
View user's profile Send private message
stary
n00b
n00b


Joined: 12 Jul 2002
Posts: 30
Location: Stockholm

PostPosted: Fri Jul 19, 2002 9:35 pm    Post subject: More noexec Reply with quote

Adding my thoughts to this: Are any of your partitions mounted noexec? It is possible that the configure script is trying to do something on e.g. /tmp which is mounted noexec, even though the configure itself is on an exec partition.
Back to top
View user's profile Send private message
lordamok
n00b
n00b


Joined: 17 Jul 2002
Posts: 28

PostPosted: Fri Jul 19, 2002 10:35 pm    Post subject: Reply with quote

no one of my pratirions is mountet as noexec
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri Jul 19, 2002 11:26 pm    Post subject: Reply with quote

Hmmm... Do you have grsecurity stuff compiled into your kernel?
Back to top
View user's profile Send private message
lordamok
n00b
n00b


Joined: 17 Jul 2002
Posts: 28

PostPosted: Sat Jul 20, 2002 8:50 am    Post subject: Reply with quote

no i have not compiled grsecurity stuff in my kernel
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sat Jul 20, 2002 9:00 am    Post subject: Reply with quote

Could you try manually creating some interpreted scripts in the same directory as your problem program and invoking them the same way, preferably using a couple of different interpreters? For example:
Code:
$ cat > afo
#! /usr/bin/perl
print "ok\n";
^D
$ chmod +x afo
$ ./afo
ok
$ cat > bfo
#! /bin/sh
echo "ok"
^D
$ chmod +x bfo
$ ./bfo
ok

_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
lordamok
n00b
n00b


Joined: 17 Jul 2002
Posts: 28

PostPosted: Sat Jul 20, 2002 1:10 pm    Post subject: Reply with quote

now, i make a new system using the stage I
(this system iss stage III)
perhaps, that's the problem ......
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Sun Jul 21, 2002 1:35 am    Post subject: Reply with quote

lordamok wrote:
chmod 755 /lib/ld*.so
root@trinity gtk-imonc-0.1.6 # ./configure
bash: ./configure: /bin/sh: bad interpreter: Permission denied


Have you tried opening the configure script by hand to see what the first line is?

There might be some corrupt data in the beginning.. that's the only thing I could think of.

sh ./configure should do it, if it has #!/bin/sh as the only characters in the first line.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Sun Jul 21, 2002 1:38 am    Post subject: Reply with quote

An octal dump of the top of the configure file is posted above and looks OK (no \r's, etc.)
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Sun Jul 21, 2002 2:25 am    Post subject: Reply with quote

Naan Yaar wrote:
An octal dump of the top of the configure file is posted above and looks OK (no \r's, etc.)


ahh sorry, I donno HOW I missed that.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Sun Jul 21, 2002 2:53 am    Post subject: Reply with quote

Yeah, it's such a short thread :wink:
arkane wrote:
...
ahh sorry, I donno HOW I missed that.
Back to top
View user's profile Send private message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Mon Jul 22, 2002 9:01 pm    Post subject: Reply with quote

Output of the following two commands, please:

# head ./configure
# ls -l ./configure

BS
Back to top
View user's profile Send private message
tyreth
Apprentice
Apprentice


Joined: 27 May 2002
Posts: 238
Location: Melbourne, Australia

PostPosted: Wed Nov 13, 2002 9:39 am    Post subject: Reply with quote

This link https://forums.gentoo.org/viewtopic.php?t=21423 may or may not contain the answer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum