LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 07-08-2005, 07:23 AM   #1
munkie_poo
Member
 
Registered: Apr 2004
Location: Newcastle, UK
Distribution: Slackware 10.2
Posts: 134

Rep: Reputation: 15
./configure: Permission denied


Code:
bash-3.00$ ./configure
bash: ./configure: Permission denied
I get this error while trying to compile 'Gens', a megadrive emulator.

Ive compiled loads of stuff in the past, so I know its not a system wide problem.

I tried under root and get exactly the same error.

Any ideas?
 
Old 07-08-2005, 07:24 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Maybe chmod +x configure ?
 
1 members found this post helpful.
Old 07-08-2005, 07:24 AM   #3
n0xvb
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; openSUSE 11.2
Posts: 255

Rep: Reputation: 32
Is the file executable? you might try the command
Code:
chmod +x configure
 
1 members found this post helpful.
Old 07-08-2005, 07:57 AM   #4
munkie_poo
Member
 
Registered: Apr 2004
Location: Newcastle, UK
Distribution: Slackware 10.2
Posts: 134

Original Poster
Rep: Reputation: 15
ooooh.. its done something

Code:
./configure
: bad interpreter: No such file or directory

will this be a problem with the script?
 
Old 07-08-2005, 09:08 AM   #5
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
Could be. Open it up in vim and take a close look at the first line. Does it look OK?
 
Old 07-08-2005, 09:12 AM   #6
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,455

Rep: Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172
Quote:
Originally posted by munkie_poo
ooooh.. its done something
Code:
./configure
: bad interpreter: No such file or directory
will this be a problem with the script?
Very probably. Most scripts begin with the sequence "#!<some_program_name>" (for some reason, it's called a "shebang" ...). For example: "#!/bin/sh". This is supposed to specify the program that is to be invoked to "run" this script; in this case, "/bin/sh." Perhaps that program does not exist, or the file is not marked "executable."

As you have seen, if you try to execute a file and the "x" permission-bit is not on (see chmod), you get a cryptic "permission denied" message. Now that you have turned-on this permission, the shell might be looking at the shebang and is trying, unsuccessfully, to invoke that interpreter-program. Just a guess, but a good one...
 
Old 07-08-2005, 09:17 AM   #7
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
IIRC, this problem can be caused by a script that has DOS-style CR/LF line endings. If so, they will need to be converted to a Unix-style LF line ending.

Give me time, and I might be able to recall the quickest way of doing that...
 
Old 07-08-2005, 10:18 AM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,154

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Quote:
Originally posted by Nobber
IIRC, this problem can be caused by a script that has DOS-style CR/LF line endings. If so, they will need to be converted to a Unix-style LF line ending.

Give me time, and I might be able to recall the quickest way of doing that...
Try the dos2unix command.
 
Old 07-08-2005, 03:26 PM   #9
Chrax
Member
 
Registered: Apr 2004
Distribution: Dapper
Posts: 167

Rep: Reputation: 31
Make sure your drive is mounted with exec priveleges (?). For example, this is what my mount command produces. Note that /dev/hdb2 is noexec. That means I won't be able to run a script from there. You can change this by modifying the options in fstab.

Code:
$ mount
/dev/hda2 on / type reiserfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/hda4 on /home type reiserfs (rw)
/dev/hda5 on /media type reiserfs (rw)
/dev/hda6 on /asdf type reiserfs (rw)
/dev/hdb1 on /x type reiserfs (rw)
/dev/hdb2 on /mnt/media type reiserfs (rw,noexec,nosuid,nodev)
none on /proc/bus/usb type usbfs (rw)
 
1 members found this post helpful.
Old 10-26-2006, 03:24 PM   #10
erpe
Member
 
Registered: Sep 2005
Distribution: OpenSuse 10.2
Posts: 114

Rep: Reputation: 15
Is this problem solved yet? I tried a whole varity of options to compile gen to no avail Thusfor I'v

-Made the configure file executable
-checked that my mounted filesystem doesn't have the noexec option
 
Old 10-26-2006, 11:24 PM   #11
n0xvb
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; openSUSE 11.2
Posts: 255

Rep: Reputation: 32
Quote:
Originally Posted by erpe
Is this problem solved yet? I tried a whole varity of options to compile gen to no avail Thusfor I'v

-Made the configure file executable
-checked that my mounted filesystem doesn't have the noexec option
You can also try
Code:
sh ./configure
 
Old 10-27-2006, 02:05 PM   #12
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu
Posts: 1,189

Rep: Reputation: 47
I think it would be sh configure

omit ./
 
Old 10-27-2006, 02:08 PM   #13
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 30
Quote:
Originally Posted by linuxhippy
I think it would be sh configure

omit ./
There is not need to omit ./, as n0xvb said it should work too
 
Old 10-27-2006, 02:10 PM   #14
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 30
Quote:
Originally Posted by erpe
-checked that my mounted filesystem doesn't have the noexec option
how do you have it mounted? I mean, with which options? Other options like user or users imply mounting as noexec.
 
Old 10-27-2006, 03:24 PM   #15
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
The ./ is important. If it is omitted, your shell will search your $PATH variable to find the application "configure". It is unlikely that it will find one, unless you have "." in your $PATH variable. If it does find one, and "." is not in your $PATH variable, the one it finds will in all probability not be the one you want. Whenever you are compiling, it is a good idea, sometimes even required, to use the ./.

BTW, there is a school of thought that says that putting "." in your path is a bad thing for security reasons. I think that is probably true for root. For a normal user, it probably isn't as bad. Just for the record, I have "." in my $PATH.
 
  


Reply


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
./configure - permission denied Odan Linux - General 14 03-31-2013 11:04 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 12:56 AM.

Main Menu
Advertisement
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