Results 1 to 25 of 25
  1. #1
    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!

  2. #2
    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

  3. #3
    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
    #

  4. #4
    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

  5. #5
    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 ?

  6. #6
    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

  7. #7
    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 file
    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?

  8. #8
    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

    Bill
    Bill - Support Analyst - Liveblock Auctions International
    http://www.LiveGlobalBid.com

  9. #9
    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. #10
    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

  11. #11
    Join Date
    Dec 2003
    Posts
    92
    I'm still unable to do the configure though...

  12. #12
    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?

  13. #13
    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*

  14. #14
    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 installed
    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?

  15. #15
    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 configure
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  16. #16
    Join Date
    Oct 2006
    Posts
    44
    Quote Originally Posted by BillBrown
    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>
    Actually, you only have to set html files to 640 or 660 (if you want members of your group to be able to edit them). All you really care about is that the webserver can read them. HTML files aren't executed by the server, so you don't need to make them executable. Files aren't created executable by default.

    That shouldn't be a problem with a configure script though.

  17. #17
    Join Date
    Dec 2003
    Posts
    92
    Quote Originally Posted by pixelized
    try moving the ffmpeg dir to /root

    mv /etc/ffmpeg /root
    cd /root/ffmpeg
    ./configure

    either that or you don't have autoconf tools installed
    Looks like they might not be installed...


    : bad interpreter: No such file or directory

  18. #18
    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

  19. #19
    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.

  20. #20
    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`;echo
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  21. #21
    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

  22. #22
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,849
    Quote Originally Posted by GeXus
    head: cannot open `configure' for reading: No such file or directory
    Where is the configure script now? cd to the same directory and try again...
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  23. #23
    Join Date
    Dec 2003
    Posts
    92
    $'#!/bin/sh\r'

  24. #24
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,849
    Yep, that's it. Should be \#\!/bin/sh

    dos2unix configure
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  25. #25
    Join Date
    Dec 2003
    Posts
    92
    It works!! Brilliant.. thank you so much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •