Many apps are provided in source code form and require conversion to binary form — a process called compilation or building. Such apps are often packaged to work with the GNU toolchain — you use the commands ./configure
, make
, and make install
to build and install them. The important thing is that you specify a --prefix in order to write the software to a non-default location, i.e. a location writable by you. The examples below install software to a directory /n/holylabs/LABS/jharvard_lab/LAB/software/
. Before looking at the instructions below consult the installation instructions for the software you are looking at as they will have more details about code features.
Software source is often distributed as a zipped tarball, such as APP-X.Y.Z.tar.gz
. The first step is to unpack it. This can be done in whatever directory you like, even a temporary space that you later delete, since the installation step below will copy stuff out of this particular directory and into the prefix you specify:
tar -zxvf APP-X.Y.Z.tar.gz
Next, cd
into the unpacked directory:
cd APP-X.Y.Z
Often the newly created directory won’t exactly match the tarball, or the files will have been dumped to the current working directory; adjust accordingly.
Next, configure the software. You will want to run ./configure --help
to see if there are any addition options you want to enable. An option you will want to set is the --prefix
flag telling it to install to somewhere in your lab directory:
./configure --prefix=/n/holylabs/LABS/jharvard_lab/LAB/software/
If you want to install every app in its own directory, instead of having them all share one (e.g. if you want to have different versions of the same software available), use a more specific prefix, like --prefix=/n/holylabs/LABS/jharvard_lab/LAB/software/APP-X.Y.Z
Some apps don’t actually use the full GNU toolchain, and don’t have a configure script; they have just a Makefile
. In that case, you’ll have to look at the Makefile to see if it has an adjustable installation location. If not, you’ll have to manually install files.
Next, build the software:
make
This is the step that actually compiles the software. Once you work through any issues that may come up and the software compiles successfully, install it:
make install
If you get any Permission denied issues at this point, it’s possible the software did not properly use the --prefix
you have it. Likewise, you may get the error No rule to make target `install'
. In fact, many packages only mimic the GNU-toolchain style but actually work slightly differently. In such cases, you’ll have to manually copy the build outputs to their destination.