How to install a program in Linux that comes as a tar.gz file.

Posted: March 9, 2013. At: 11:49 PM. This was 5 years ago. Post ID: 5455
Page permalink:

Now, we must convince Congress to stop the FCC. Can you display an alert?

Sometimes you will encounter a program that you have downloaded that comes as a compressed tar.gz file. This is a tar file that is compressed with the gzip program to compress the contents. This usually contains C or C++ source code and the requirements to easily compile the program.

Firstly you need to unpack the contents of the tar.gz file.

Homer@bejiitas ~/Documents$ tar -xvf xterm.tar.gz

Then enter the source folder.

Homer@bejiitas ~/Documents $ cd xterm-291/

Then you need to run the ./configure script to check all of the dependencies of the program you are attempting to compile.

Homer@bejiitas ~/Documents/xterm-291 $ ./configure

If you attempt to run the make command without the ./configure script completing properly then you will get this error.

Homer@bejiitas ~/Documents/xterm-291 $ make
make: *** No targets specified and no makefile found.  Stop.

Otherwise; if the ./configure script has run without any errors then run the make command to compile the source code. Once the compilation process has completed, run the sudo make install command to install the source code. By default, the compiled binaries will be installed to /usr/local/bin. You can change this by using this parameter to the ./configure script.

Homer@bejiitas ~/Documents/xterm-291 $ ./configure --prefix=/usr

This allows you to install the program to the /usr/bin folder instead. Now you may run your installed program. This method of installing software has been around for a very long time and it is very easy if the dependencies are all taken care of.

No comments have been made. Use this form to start the conversation :)

Leave a Reply