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.