Contents


Preamble


Configure + make + make install

Many packages can be compiled and installed like this:

configure
make
make install

This may require administration privileges to install the new package into protected system directories.

To change the prefix for the installation and put the files somewhere else locally, you can do this:

configure --prefix=/local/directory
make
make install

Replace /local/directory for the desired installation path.

cmake + make + make install

Installing a source package using cmake is slightly different than the example above. The entire process would look like this:

tar -zxvf <program>-<version>.tar.gz
cd <program>-<version>
mkdir build 
cd build
cmake .. 
make 
make test 
make install

Do this if you need to change the default installation prefix with cmake:

cmake -DCMAKE_INSTALL_PREFIX:/local/directory
make
make install