LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-19-2002, 06:47 AM   #1
Phonics3k
Member
 
Registered: Jun 2002
Location: Wales, UK
Distribution: Gentoo 2005.1
Posts: 213

Rep: Reputation: 30
Angry Configure Script??


Wheneva I try and use a configure script I keep getting "bad interpreter: Permission denied"

I am using SuSE Linux 8.0 with the bash shell and I am Logged in as root.

Do i need to chmod it??

or is it somethin else that is wrong!

Some1 PLEASE HELP!
 
Old 06-19-2002, 07:03 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Yes

chmod +x configurescript

Also make sure the interpreter which is used on the first line is both present and the user has permission to execute it.
 
Old 06-19-2002, 07:44 AM   #3
Phonics3k
Member
 
Registered: Jun 2002
Location: Wales, UK
Distribution: Gentoo 2005.1
Posts: 213

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mik
Yes

chmod +x configurescript

Also make sure the interpreter which is used on the first line is both present and the user has permission to execute it.
interpreter is present, well y wouldnt it be?

 
Old 06-19-2002, 08:33 AM   #4
Phonics3k
Member
 
Registered: Jun 2002
Location: Wales, UK
Distribution: Gentoo 2005.1
Posts: 213

Original Poster
Rep: Reputation: 30
i have changed the permissions on the script and it still will not work

i am logged in as root and it still says permission denied
 
Old 06-19-2002, 08:44 AM   #5
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 8.04
Posts: 668

Rep: Reputation: 31
May be a group ownership thing. Do an ls -al on your configurescript filename. If the group name is not root (and you are executing it as root), then enter:

chgrp root <configurescript.filename>

Also, when you execute it, make sure you enter:

./configurescript.filename
 
Old 06-19-2002, 11:14 AM   #6
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well there can be many reasons why an interpreter isn't present. Just because you are running the script in bash doesn't mean it will use that interpreter. The first line of the file tells it which interpreter to use, something like:

#!/usr/bin/perl

If perl happens to have been installed in a different location then that wouldn't work. But it has to be something else because then you would get an error message something along the lines of file not found. Unless the interpreter itself wouldn't be executable, but that's very unlikely. And you said you've changed the permissions on the script itself too.
The weird thing is that it's complaining about the interpreter and not the script itself. Are you able to run the interpreter just by itself as the same user?
 
Old 06-19-2002, 05:47 PM   #7
Phonics3k
Member
 
Registered: Jun 2002
Location: Wales, UK
Distribution: Gentoo 2005.1
Posts: 213

Original Poster
Rep: Reputation: 30
how do u run the interpreter, soz i am a !

if i could just get this to work then thats all my problems solved.

I will try the idea above miks now and then boot back on to windows, so that i can load the net up
 
Old 06-19-2002, 05:50 PM   #8
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 58
The first line of the script should call the interpreter, so if its perl, check to see you have perl installed with:

which perl

If its lisp (I have no idea why it would be), which for lisp.

Luck,

Finegan
 
Old 06-19-2002, 06:12 PM   #9
Phonics3k
Member
 
Registered: Jun 2002
Location: Wales, UK
Distribution: Gentoo 2005.1
Posts: 213

Original Poster
Rep: Reputation: 30
i did the chgrp root thing and that didnt work.

when I did "which perl" the output was "/usr/bin/perl"

But i still cant get my scripts to work they still say "bad interpreter: Permission denied"
 
Old 06-19-2002, 06:48 PM   #10
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 58
Make certain that the script needs perl,

more scriptfilename

and the first line should tell you what interpreter it uses and where its expecting to find it.

Cheers,

Finegan
 
Old 06-19-2002, 06:52 PM   #11
Phonics3k
Member
 
Registered: Jun 2002
Location: Wales, UK
Distribution: Gentoo 2005.1
Posts: 213

Original Poster
Rep: Reputation: 30
yes all the scripts i have looked at have #!/bin/sh

if i change that to /usr/bin/perl then it still says the same error
 
Old 06-20-2002, 04:39 AM   #12
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well if it's a shell script then don't try to run it with the perl interpreter because that won't work. If you are going to change it to anything change it to /bin/bash instead since you said you are running that shell. So it must work. I've tried in different ways to get the same error as you did. But the only way I can get a permission denied is if I clear the executable bits on /bin/sh. To run a shell just type the full name in a terminal. Like /bin/sh to run sh, or /bin/bash to run bash.
The only thing I can think of is that you've maybe got some weird characters in your script which are causing it to go bogus. Try running the following commands to see if you can run simple scripts. Just type these lines out one by one. If after the last command you get to see the word ok then everything is fine.

cat > tryout <<EOF
#!/bin/sh
echo ok
EOF
chmod +x tryout
./tryout
 
Old 06-20-2002, 11:06 AM   #13
Phonics3k
Member
 
Registered: Jun 2002
Location: Wales, UK
Distribution: Gentoo 2005.1
Posts: 213

Original Poster
Rep: Reputation: 30
I have resolved the problem now, it was because the script was on my windows partition. I moved it to /tmp just to see and it worked.

Thanx for all the help guys.
I have lernt alot already!

 
  


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
Creating a configure script hylke Programming 4 04-21-2005 02:47 PM
debugging configure script Avatar33 Programming 3 03-23-2005 05:35 PM
Qt and configure script Peterius Linux - Software 0 10-18-2004 01:32 PM
Yet another configure script that won't run gauge73 Linux - Newbie 1 02-14-2004 03:25 PM
configure script and dependencies Dark_Helmet Linux - Software 0 07-28-2003 08:14 PM


All times are GMT -5. The time now is 05:53 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration