How to compile packages in Ubuntu

If you have downloaded a “tar.gz” or “tar.bz2” package which contains installation files for an Application, then to install the application:

1. Install build-essential.

To install build-essential, open “Accessories->Terminal”, and type:

sudo apt-get install build-essential

The above command will install build essential, which is nessesory to be able to compile “tar” packages.

Now you need to untar the  “tar” file.

2. Untar the package file.

To untar the package, open “Accessories->Terminal”, and type the following after changing directory to directory containing package file:

tar -xf archive_name.tar.gz


tar -xf archive_name.tar.bz2

The above command will untar the package. Now you need to compile it.

3. To compile the extracted package file.

Now once you have extracted the package files, you have to compile it as follows(after going into the directory containing the package files:


4. Finally compile it.
To install the compiled package, open “Accessories->Terminal”, and type the following:

sudo make install

This will install the compiled package.


Leave a Reply

Your email address will not be published. Required fields are marked *