Often you’ll find some applications not available in your OS repository/third party repository or you need to install a recent version than the one in your repository. Whatever the case might be, you’re left with no option but to compile & install the application from the source tarball provided from the application’s project website. Beginners might feel this process to be intimidating but its not that difficult. Once you repeat it a couple of times, it will become a second nature to you. I’ll outline some basic steps which will help you to install the application from a source tarball.

Go to application’s project webpage & download the source tarball. It will mostly be in tar.gz or tar.bz2 format. Tarball is nothing but a compressed format similar to .zip or .rar on windows platform.

Once the download is complete. You’ll need to extract the contents of the tarball. You can either do this via the GUI utility ‘Ark’. However I recommend you learn the command to do this. Will help you in long stead.

For tar.gz use;

#tar – zvxf foobar.tar.gz

For tar.bz2;

#tar – xvjf foobar.tar.bz2

Here;

x – stands for extract

v – verbose output

j – deal with bzipped file

f – read from file instead of tape device

z – uncompress archive using gzip

Now navigate to the folder where you extracted the tarball contents. Lets assume, you extracted it into the following directory,

#cd /home/user/foobar

Once you’re into the directory, I recommmend you list the contents of the directory.

#ls -l

Most probably you will find a README file. I highly recommend reading this file before going any further. This README file will provide with a plethora of options to know about dependencies required, the general functioning of the program, FAQ’s etc. You can read the file in the console itself using,

#cat README

If the readme file lists some dependencies, you’ll need to make sure you’ve all of them installed before proceeding. Install it via your package manager.

Now that I assume you might have satisfied all the dependencies for the package & are ready to proceed. While still working into the directory where you extracted tarball issue,

#./compile

Make sure the process completes successfully. If there are any errors in compiling, take a note of them & rectify them as you cannot proceed before you compile. Most of the times, the console will throw suggested solutions to the error. You can look up the man pages or research over the web to solve the error. Once done proceed with,

#make

After this command is complete issue,

#make install

That’s it. Your application is now compiled & installed. You can find it under the launcher menu of your desktop environment or launch it by typing its name into the console.

About these ads