Compiling software from source

This guide which teach you how to install custom software by compiling it from its source code. It assumes you can run commands via SSH. There is a separate guide on how to connect to your slot via SSH. Commands are kept as simple as possible and in most cases will simply need to be copied and pasted into the terminal window (then executed by pressing the Enter key).

You should also consider reading the general information on installing custom software as background to this, though you might find it isn't necessary to install your desired piece of software.

Table of contents

Pre-requisites

The first thing to do is to create the ~/bin directory and reload the relevant files for the PATH setting to take effect using this command:

mkdir -p ~/bin && bash

If the directory already exists you will not delete its contents by recreating it using the command above, so there's no need to worry about that.

Getting and building from source

The most obvious thing you need to then do is actually get the source code on your slot. In the example below we're downloading source files which are packaged as a tar archive. This is fairly common, but you might need to tweak things if you get errors.

wget -qO source.tar.gz https://somesite.com/source-version.tar.gz
tar xf source.tar.gz
cd ~/source-version
./configure --prefix=$HOME
make && make install

The program will proceed to be built - it may take a while depending on the software. Once done, it should have been built with everything relative to $HOME - the software program itself (the executable binary) will most likely be in ~/bin.

You can then clean up things if you want:

rm -rf source/tar.gz source-version/