Tuesday 27 May 2014

How to install a .tar.gz file in Linux

First of all, .tar.gz files cannot be "installed". These files are gzip-compressed tarballs equivalent to .zip files in Windows platform. .tar.gz files usually contains the source of a program and it needs to be extracted before you compile the program from the source. So, to 'install' a .tar.gz file in Linux, you need to extract it first on your hard-drive and then compile the program from the source. 

How to install a .tar.gz file in Linux

.tar.gz iconStep 1: The first step is to extract the gzip-compressed tarballs archive to a folder. You can extract an archive by right-clicking on it and choosing the appropriate option. Alternatively, you can extract an archive through terminal :

tar xzf file.tar.gz 

file is the package-name.
Step 2: Now, use the cd command to navigate to the destination folder where you have extracted the .tar.gz archive. 

The next step is to build the binaries:

./configure
make

To install it in the system, use the following command in the terminal:

sudo make install

To summarize up, the process of installing a .tar.gz file includes downloading the file, unpacking it to the preferred choice and then compiling the program from the source.

Note 1: Usually, the installation instructions are provided in the .tar.gz archive in a text file named either 'README' or "INSTALL'. It will include all the installation procedure. 

Note 2: Before downloading and compiling a source, why not to search it in the software center. Searching an application in the software center ensures that you download the latest and stable release of that software and you do not have to go through this compilation processes. 

0 comments:

Post a Comment