"./configure" command does not work

73,863

Solution 1

locate will not work unless you have a up-to-date database.

Try find . -type f -name configure instead, or issue a updatedb command first, then do the locate (make sure the current path isn't excluded)

Solution 2

The 'configure' command is NOT a standard Linux/UNIX command.

configure is a script that is generally provided with the source of most standardized type Linux packages and contains code that will "patch" and localize the source distribution so that it will compile and load on your local Linux system. Sometimes configure is put on your disk without the execute bit set, so the configuration could be invoked by sh ./configure....depending on the package, that is why they tell you to look at any type of README file.

Solution 3

usually configure is in the top directory after you extracted the source of a package.

example:

mst@mst-gentoo-ws /tmp $ tar -xzf nginx-1.2.0.tar.gz 
mst@mst-gentoo-ws /tmp $ ls nginx-1.2.0/configure 
nginx-1.2.0/configure

so after unpacking, you have to cd into the newly created folder, and thats where configure should be.

Share:
73,863

Related videos on Youtube

Vlastimil Burián
Author by

Vlastimil Burián

I am passionate about Linux systems in general and POSIX shell scripting in particular.

Updated on September 18, 2022

Comments

  • Vlastimil Burián
    Vlastimil Burián over 1 year

    I need to compile a package but the ./configure command does not work?

    I'm getting the following error:

    -bash ./configure : No such file or directory
    

    Where is that script?

    I used the locate command but it did not return anything.

  • Lou
    Lou over 3 years
    Hi @mdpc, coming to this question with the same problem. If my distro doesn't have a configure command, do you know if there is any way to install it? Or do you have to do something else to install?
  • 0xLogN
    0xLogN about 3 years
    @Lou You don't install configure. ./configure runs the script configure in your current working directory, and most standard packages provide one (for example, try cloning the Bash source code, then cd to the dir and run ./configure) which prepares what is usually a Makefile.