Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Try to learn about SuSE Mandrake Debian(Knoppix)
Posts: 24
Rep:
./configure - permission denied
Hello,
when i try to do "./configure" (i was going to install "lame") the system tells me i´m 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"?
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.
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
Distribution: Try to learn about SuSE Mandrake Debian(Knoppix)
Posts: 24
Original Poster
Rep:
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>
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):
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.
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 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
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.