Results 1 to 25 of 25
Thread: using ./configure
-
10-16-2006, 03:44 PM #1Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
using ./configure
I'm trying to install ffmpeg, and in the instructions im told to use './configure', but when I type that ./configure on the command line it says permission denied.. but i am root access.. am i doing this wrong?
Thanks!
-
10-16-2006, 04:00 PM #2Disabled
- Join Date
- Aug 2005
- Posts
- 443
Is the configure script executable? Try the following command:
chmod 700 configure
Then run ./configure again. If it still throws an error, paste the full output here for everyone to see, as well as the output of the following command:
head -5 configure
-
10-16-2006, 04:15 PM #3Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
This is what I got...
root@server129 [/etc/ffmpeg]# chmod 700 configure
root@server129 [/etc/ffmpeg]# ./configure
: bad interpreter: No such file or directory
root@server129 [/etc/ffmpeg]#
Then for head -5 configure
root@server129 [/etc/ffmpeg]# head -5 configure
#!/bin/sh
#
# ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
#
-
10-16-2006, 05:06 PM #4Junior Guru
- Join Date
- Aug 2006
- Location
- Regina, Saskatchewan, CA
- Posts
- 221
Generally, you don't need to run configure scripts as root.
Issue this command: which sh
If sh (usually /bin/sh) is in your path, it'll come back with the path to sh. If not, you'll need to either call it directly like so...
/bin/sh ./configure
Or you'll need to add it to your path (which is the better idea).
You can do this temporarily by adding /bin to your path. Add directories to the line below to include them in your path. Separate each directory with a colon ":".
PATH=$PATH
Becomes...
PATH=$PATH:/bin
Hit your [enter] key.
However, you should add it more permanently if it's not in your path by default. In your home directory, you have a hidden file called .bash_profile. Open that file using your favorite editor. Note the dot in front of "bash". That's part of the filename. You'll need to include the dot. If you're using vi or vim, do like this:
(Be not-root. Type 'exit' if you're root. Log in as normal user if necessary).
cd ~
(This takes you to your home directory.
vi .bash_profile
Edit the line that reads something like this:
PATH=$PATH:$HOME/bin
To the end of that line, add this:
:/bin
Be sure to include the : and the / as well as the word 'bin'. Then save the file. If you're using vi or vim, hit your [esq] key then type the following:
:wq! [enter]
Close out your display manager and log out of the system. Log back in. You should have /bin in your path.
To see what's in your path, type this:
echo $PATH
That took forever, eh~? It's not something that you'll need to do often, though.Bill - Support Analyst - Liveblock Auctions International
http://www.LiveGlobalBid.com
-
10-16-2006, 05:12 PM #5Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
Hm... so because /bin/sh is in the configure file.. should i move all my files which are currently in /etc/ffmpeg (where i just placed them).. to /bin/sh ?
-
10-16-2006, 05:36 PM #6Junior Guru
- Join Date
- Aug 2006
- Location
- Regina, Saskatchewan, CA
- Posts
- 221
Leave the code where it was when you unpackaged it. Try unpackaging ffmpeg to a directory that your regular user has full access to. That doesn't need to be the /home/user directory but maybe not in /etc/. Then again, it's just preference.
The #!/bin/sh at the top of the configure script just tells your operating system which interpreter to use to read the code and do what it says to. Linux doesn't care about file extensions. The configure.sh file will be read the same as configure.blah or configure.stuff as long as it's told what to use to read it. In this case, /bin/sh is called. :-)
Does this make sense~?Bill - Support Analyst - Liveblock Auctions International
http://www.LiveGlobalBid.com
-
10-16-2006, 05:38 PM #7Predatory Poster
- Join Date
- Jul 2003
- Location
- Goleta, CA
- Posts
- 5,566
no /bin/sh is your shell application. sh is also commonly refererred to as the bash shell (bourne again shell)
ie this line #!/bin/sh says to use the bash shell to run the program
try changing the path to /bin/bash in the configure filePatron: I'd like my free lunch please.
Cafe Manager: Free lunch? Did you read the fine print stating it was an April Fool's joke.
Patron: I read the same way I listen, I ignore the parts I don't agree with. I'm suing you for false advertising.
Cafe Owner: Is our lawyer still working pro bono?
-
10-16-2006, 05:44 PM #8Junior Guru
- Join Date
- Aug 2006
- Location
- Regina, Saskatchewan, CA
- Posts
- 221
Incidentally, the chmod 700 was definately a good idea. This would allow you, as root, to ensure that the file itself was executable. About 99% of the time, permission errors in Linux environments can be resolved with either chmod (changing mode) or chown (changing ownership).
700 gives full permission to the owner.
770 gives full permission to the owner and his/her group.
777 gives full permission to everyone. That's everyone who is logged into the machine or accessing it through the Web. The 777 permission is a scary thing and should almost never be used.
To figure out how to set specific permissions, just add.
1 = execute
2 = write
4 = read
So, say you have an HTML document that you want to share with the people in your group. To give yourself full access, your group read and write and everyone else nothing, apply a 760.
chmod 760 <file name>
If it's a script, and you want your group to be able to run it but not read or write to it, apply a 710.
chmod 710 <file name>
This is unusual but I figured I'd mention it so you could see the example.
Further reading can be found here:
http://www.pair.com/support/knowledg...rmissions.html
BillBill - Support Analyst - Liveblock Auctions International
http://www.LiveGlobalBid.com
-
10-16-2006, 06:00 PM #9Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
Thanks for you help on this! so I did which sh, and it came back with /bin/sh, so now what would I need to do to configure this?
I'm not even entirely sure I need to configure (man am i confused!).. I might just need to compile everything (which I can't figure out either)..
-
10-16-2006, 06:15 PM #10Junior Guru
- Join Date
- Aug 2006
- Location
- Regina, Saskatchewan, CA
- Posts
- 221
Your configure script is going to spit out a lot of information. What it is doing is checking to make sure that everything that will be needed for the application to compile (and ultimately work) correctly is installed and finds its location. Quite often, even when everything that's necessary is installed, which throws out a lot of 'yes' results, there are still some 'no' results. That's okay. As long as the configure script finishes, and then tells you to go on to the next step, you're fine.
To compile it, 'make' (/usr/bin/make) is usually what you want to use. That'll build the application as a whole. After it's compiled, to install the application, 'make install' will usually do the trick. You'll need to run the 'make install' as root. I'm remember installing ffmpeg but I don't remember what else was involved. I'm sure the INSTALL or README documentation will explain it.Bill - Support Analyst - Liveblock Auctions International
http://www.LiveGlobalBid.com
-
10-16-2006, 06:31 PM #11Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
I'm still unable to do the configure though...
-
10-16-2006, 06:35 PM #12Predatory Poster
- Join Date
- Jul 2003
- Location
- Goleta, CA
- Posts
- 5,566
ls -l /bin/sh
ls -l /bin/bash
what do those commands oputput?Patron: I'd like my free lunch please.
Cafe Manager: Free lunch? Did you read the fine print stating it was an April Fool's joke.
Patron: I read the same way I listen, I ignore the parts I don't agree with. I'm suing you for false advertising.
Cafe Owner: Is our lawyer still working pro bono?
-
10-16-2006, 06:43 PM #13Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
root@server129 [/etc/ffmpeg]# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Oct 6 01:34 /bin/sh -> bash*
and
root@server129 [/etc/ffmpeg]# ls -l /bin/bash
-rwxr-xr-x 1 root root 616312 Nov 5 2004 /bin/bash*
-
10-16-2006, 06:51 PM #14Predatory Poster
- Join Date
- Jul 2003
- Location
- Goleta, CA
- Posts
- 5,566
try moving the ffmpeg dir to /root
mv /etc/ffmpeg /root
cd /root/ffmpeg
./configure
either that or you don't have autoconf tools installedPatron: I'd like my free lunch please.
Cafe Manager: Free lunch? Did you read the fine print stating it was an April Fool's joke.
Patron: I read the same way I listen, I ignore the parts I don't agree with. I'm suing you for false advertising.
Cafe Owner: Is our lawyer still working pro bono?
-
10-16-2006, 06:57 PM #15Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Have you been editing the configure script on a Windows machine, by any chance?
If so try:
dos2unix configureChris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
10-16-2006, 08:21 PM #16Junior Guru Wannabe
- Join Date
- Oct 2006
- Posts
- 44
Originally Posted by BillBrown
That shouldn't be a problem with a configure script though.
-
10-16-2006, 08:24 PM #17Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
Originally Posted by pixelized
: bad interpreter: No such file or directory
-
10-16-2006, 08:30 PM #18Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
Just wanted to add.. I have cpanel installed, and if I do an apache update, for anything... I'll notice that it does print out ./configure on the page.. so it appears as though it is using this.. somehow
-
10-16-2006, 08:36 PM #19Junior Guru Wannabe
- Join Date
- Oct 2006
- Posts
- 44
You can check to see if you have autoconf by typing
which autoconf
if it gives you a line like '/usr/bin/autoconf' then its installed.
-
10-16-2006, 08:54 PM #20Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
"bad interpreter" would imply that /bin/sh is not available, but apparently it is. I still think there's something wrong with the shebang (eg. a dos line ending).
Do this and show the result:
printf %q `head -n 1 configure`;echoChris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
10-16-2006, 10:14 PM #21Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
I did which autoconf and got /usr/bin/autoconf
Then I did
root@server129 [/]# printf %q `head -n 1 configure`;echo
head: cannot open `configure' for reading: No such file or directory
-
10-16-2006, 10:26 PM #22Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Originally Posted by GeXusChris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
10-16-2006, 10:40 PM #23Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
$'#!/bin/sh\r'
-
10-16-2006, 10:53 PM #24Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Yep, that's it. Should be \#\!/bin/sh
dos2unix configureChris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
10-16-2006, 10:55 PM #25Junior Guru Wannabe
- Join Date
- Dec 2003
- Posts
- 92
It works!! Brilliant.. thank you so much!