Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When we,

./configure
make
make install

where are the programs installed?

share|improve this question
add comment

migrated from stackoverflow.com Jul 4 '10 at 2:43

This question came from our site for professional and enthusiast programmers.

2 Answers

As Dirk notes, the default prefix is "/usr/local"; however, you can change it. For example:

./configure --prefix=/opt/local
make
sudo make install

Note, though, that you should not install software in this way. You should use Ubuntu's package management system called apt-get to install software. You should only use configure+make+make install if there is no apt-get repository containing a package for it. The reason you should use apt-get is that it automatically manages dependencies and versioning of software and will ensure that your software is automatically updated. Installing things manually is a good way to shoot your system to hell by introducing dependency conflicts or a good way to have outdated, possibly vulnerable software on your system. So, before you install something that way, you should use apt-cache search to find out of a package already exists, and then you can use sudo apt-get install to install it. Example:

apt-cache search boost # This will show all sorts of packages related to Boost
sudo apt-get install libboost-dev # Ok, this is the one on the list I want
share|improve this answer
1  
in particular, building your own stuff with PREFIX=/usr most definitely counts as "doing it wrong" and will break your system in the long run. –  hobbs Jul 4 '10 at 2:33
1  
You can also add the prefix on the make install step -- that is how .deb packages are configured for /usr/ but installed to temporary directory where they are packaged up from. –  Dirk Eddelbuettel Jul 4 '10 at 2:38
    
@hobbs Is it okay to use this way to build a library (like libjpeg) and not break things? I am in the impression that the make install step just copies built files to the specified folder prettily.. which should be safe. (?) Can you please explain? Thanks! –  Max May 8 '13 at 22:36
add comment

Default prefix (or destdir) is /usr/local unless that has been overridden in the autoconf logic.

You can often override this in the make install step too.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.