Compilation from source

From LQWiki
(Redirected from Compile from source)
Jump to navigation Jump to search

Sometimes you need or want to build software from source. You typically download it as a tarball, so you will need tar and bunzip2 or gunzip.

For example, download and unpack pingus:

wget http://pingus.seul.org/files/pingus-0.6.0-binary-linux-i386.tar.bz2
tar xvjf pingus-0.6.0-binary-linux-i386.tar.bz2
cd pingus-0.6.0

There will usually be a file named README or something similar.

less README

It's important to make sure you read the whole file to ensure you have everything that's needed installed and that you know any special steps.

Now, you must run the configuration and compile. There are a number of variations, which may or may not need configure, might use make or cmake, which is why it's important to read the readme file. An example might be:

./configure && make && sudo make install

Sudo is almost always needed to install.

TroubleShooting

Most likely the configure script will fail because of missing dependencies to the development packages. No worry, read and follow the hints at configure. You will also find examples there.

See also