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! :Pengy: |
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. |
Quote:
:newbie: |
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 |
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 |
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? |
how do u run the interpreter, soz i am a :newbie: !
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 |
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 |
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" |
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 |
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 |
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 |
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! :D :D :D :D :D :D :D :D :D |
All times are GMT -5. The time now is 08:56 PM. |