LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-22-2003, 07:52 AM   #1
Odan
LQ Newbie
 
Registered: Jun 2003
Location: Germany
Distribution: Try to learn about SuSE Mandrake Debian(Knoppix)
Posts: 24

Rep: Reputation: 15
Unhappy ./configure - permission denied


Hello,

when i try to do "./configure" (i was going to install "lame") the system tells me im not permitted (even if i am root) i tried to change the bash to /bin/ash and /bin/sh and /usr/bin/rbash but nothing worked.
If i skip ./configure and try directly "make" and then "make install" it seems to work. At least i can call "lame" to work. So, is "./configure" really necessary or is there maybe another reason is it okay if i go straight ahead with "make"?

Thanks for any reply

Odan
 
Old 10-22-2003, 07:59 AM   #2
clacour
Member
 
Registered: Sep 2003
Location: Dallas, Tx, USA
Distribution: Red Hat, Gentoo, Libranet
Posts: 98

Rep: Reputation: 16
The only thing I can think of that would cause that message if you're root was if "configure" was not executable. Do an "ls -l configure" on it and make sure is has "x"s. (And make sure it has an "x" that applies to root. If the owner and group are leg.lame, you'll need the "other" execute permission set, because root is not "leg" and it's not in the group "lame".

Your other question, about whether configure is necessary, is different for every package.

Usually, configure looks at things like what C compiler you have, what architecture your machine is, what other packages are installed, etc. If you have a system fairly close to the original developer, "make" with no pre-configuration might work for you. Generally, though, configure is something you must do. Definitely avoid starting the habit of running without it.

Hope this helps,

CHL
 
Old 10-22-2003, 08:33 AM   #3
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
An alternative answer, some software does not need configure to start to install stuff, some use scripts and if you search the directory of your intended program you may find
"install.sh" or words to that effect

so you run that command by /.install.sh
 
Old 10-22-2003, 01:18 PM   #4
tyccea
Member
 
Registered: Aug 2003
Location: atlanta, ga
Distribution: SuSE 8.2
Posts: 90

Rep: Reputation: 15
I've had to type
sh ./configure
for some programs.

hth
 
Old 10-24-2003, 07:39 AM   #5
Odan
LQ Newbie
 
Registered: Jun 2003
Location: Germany
Distribution: Try to learn about SuSE Mandrake Debian(Knoppix)
Posts: 24

Original Poster
Rep: Reputation: 15
I tried

Hi,

i gave everybody the ececutable "x" but it doesn't matter if i do it as root or as owner i always get the same failure and not only while i try installing "lame" same happened when i tried to ./configure sources for KDE3.1 i only could do it with rpm's well but often you do not have rpm for your distri.

I tried following

odan@linux:/allhome/lame/lame-3.93.1> ./configure
bash: ./configure: /bin/sh: bad interpreter: Keine Berechtigung "(German Word for 'Permission denied')"

odan@linux:/allhome//lame/lame-3.93.1> sh ./configure
./configure: line 959: config.log: Permission denied

odan@linux:/allhome/lame/lame-3.93.1> ./install-sh
bash: ./install-sh: /bin/sh: bad interpreter: Keine Berechtigung
odan@linux:/allhome/Helmut/lame/lame-3.93.1>

any other idea???

Thanks for your patience
 
Old 10-24-2003, 09:41 PM   #6
clacour
Member
 
Registered: Sep 2003
Location: Dallas, Tx, USA
Distribution: Red Hat, Gentoo, Libranet
Posts: 98

Rep: Reputation: 16
Re: I tried

Yes, this piece:
Quote:
odan@linux:/allhome/lame/lame-3.93.1> ./configure
bash: ./configure: /bin/sh: bad interpreter: Keine Berechtigung
gives a strong hint where the problem might be.

"Bad interpreter" means one of two things: the interpreter in question is not in /etc/shells, or it's not in the place where they're saying it is.

Do a "which sh". It's very likely it's somewhere other than /bin (/sbin being the most likely).

Another potential problem is that, even if /bin/sh does exist, if that filename (using the full path) is not in /etc/shells, it's not considered a legal interpreter, and the system will not execute it.

Do the following commands:

"which sh". That should tell you where "sh" is. If it's in /sbin/sh or /usr/bin/sh, change the first line of "configure" to match.

cat /etc/shells, and make sure whatever you have on the first line (after the "#!") is in that file. One of the lines in /etc/shells must be an exact match to that filename, or it won't be allowed.

If none of that fixes it, please post the output of (from the lame compile directory):

"ls -l config install.sh /bin/sh"

Good luck,

CHL
 
Old 04-20-2004, 01:09 AM   #7
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Rep: Reputation: 16
Did this thread die? I'm having the same problems, and I've checked all the things you said, and I still can't run any scripts without having to physically type /bin/bash ./configure.

Here's the output of ls -l configure /bin/bash:

lrwxrwxrwx 1 root root 4 Apr 4 11:52 /bin/sh -> bash
-rwx--x--x 1 ccellist users 147826 Apr 7 14:58 configure

I've checked /etc/shells, and /bin/sh is definitely there, as is /bin/bash, and the others.

Still getting the "bad interpreter: Permission denied" message.

Thanks.
 
Old 04-20-2004, 07:48 AM   #8
mandeltuete
Member
 
Registered: Mar 2003
Location: Switzerland
Distribution: Fedora 3
Posts: 75

Rep: Reputation: 15
Check your permissions of /bin/bash and /bin/sh. They have to have execute permissions.

HTH
 
Old 04-20-2004, 09:08 AM   #9
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Rep: Reputation: 16
Actually what happened was that for some reason my /home partition was set to noexec in fstab. So I changed the fstab entry to 'defaults' and, magically, scripts work now. Go figure. Had to go digging quite deep into this wonderful site to figure it out, but it did the trick. Now even my hotkeys work!

Thanks for the input.
 
1 members found this post helpful.
Old 06-03-2007, 02:12 PM   #10
pklaus
LQ Newbie
 
Registered: Jun 2007
Location: Frankfurt/Main, Germany
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 0
Smile

thanks cellist for the great information!
In my case the volume wasn't mounted as noexec but as default,user where "user" implys "noexec". A short look into
Code:
man fstab
and
Code:
man mount
reveals it...


Thanks again!

For newbies:

[in most cases you need root rights to do the following steps]
You have to check the file /etc/fstab:
Look out for the volume where the sources of the program to compile are. Remove the statement "noexec" (without quotes) or if you find "user" there replace it with "user,exec".
unmount the device, mount it again... enjoy the compiling with
Code:
$./configure
Code:
$make
and
Code:
#make install

Last edited by pklaus; 06-03-2007 at 02:20 PM.
 
Old 11-29-2008, 06:33 PM   #11
JHPArizona
LQ Newbie
 
Registered: Jun 2007
Location: Northern Arizona
Distribution: Redhat / Knoppix / Ubuntu
Posts: 4

Rep: Reputation: 0
Thanks pklaus!
,user was my problem in fstab also. I had moved my downloads directory to another partition with more space but....since that partition was mounted with user, I could not run ./configure
 
Old 11-07-2009, 12:50 AM   #12
fedoraaddict
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
Actually I'm having the exact same problems, google sent me to this thread and although it's somewhat old, perhaps a revival would help me? I went into fstab and didn't find user, user exec or anything resembling it. I found:


#
# /etc/fstab
# Created by anaconda on Sat Oct 3 16:31:46 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
UUID=148b7e88-eb2d-4e7d-a4ee-c12b833a3ae8 /boot ext3 defaults 1 2
/dev/mapper/vg_myname-lv_root / ext4 defaults 1 1
/dev/mapper/vg_myname-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
#devpts options modified by setup update to fix #515521 ugly way
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
 
Old 11-07-2009, 10:55 AM   #13
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
fedoraaddict

the only relevant hard drive partitions in your fstab IMHO are:
/
/boot

/boot should only ever be root controlled...so defaults should be ok...but if you have trouble with it you can call it user

user = root user
users = everyone
(and these 2 terms are normally useful for removable media and not for / or /boot

However I notice you have moved to ext4 which I have no experience with.

2) what is your current error and what is the output of the configure file? (POST inside a code box if its big or cull it please)

3) as pklaus says....as local user run

Code:
./configure --help (to see what options you have or)
./configure
make
sux (and enter root password to install system-wide applications)
make install
If you use ./configure --help with a certain DIR you can install software that is executable to the local user but thats a bit selfish?
 
Old 03-31-2013, 10:42 AM   #14
eng_walid_amer
LQ Newbie
 
Registered: Mar 2013
Location: egypt
Posts: 1

Rep: Reputation: Disabled
just run command as a root user by typing sudo before your command
>> sudo make
 
Old 03-31-2013, 11:04 AM   #15
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,565

Rep: Reputation: 659Reputation: 659Reputation: 659Reputation: 659Reputation: 659Reputation: 659
This 10-year-old thread keeps coming back to life. I suppose that today, Easter Sunday, is an appropriate day for that.
 
  


Reply

Tags
compile, denied, interpreter, mount, permission


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
./configure: Permission denied munkie_poo Slackware 31 07-15-2012 03:55 AM
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 05:50 AM
./configure: Permission denied Qing Feng Linux - Newbie 3 11-16-2004 12:08 PM
./configure --> permission denied mrosati Linux - Software 3 05-13-2004 03:48 PM
./configure errors: permission denied! TippExed Linux - Software 4 09-10-2002 11:50 AM


All times are GMT -5. The time now is 03:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration