Installing From Tarballs

November 17th, 2006 mysurface Posted in Common, make, tar | Hits: 78496 | 5 Comments »

We usually download linux programs through package handling tools such as yum and apt-get. Download programs through package handling tools is easy, but not all programs is available in your Linux distribution repository. Sometimes, we need to download the source code, compile and install manually.

Usually, source code are compress in the archive format, its either tar.gz (.tgz) or bz2. The command uses to extract these archive is tar. Let say your archive is ns2.29.tar.gz, then you can decompress it and extract to your folder like this

tar -xzvf ns2.29.tar.gz -C /usr/src

-C is to indicate tar where to store the extracted files, you can extract the source code any place you like, such as home directory.

Before you start configure and install, please always read the readme files tag alone with tarball, it will sometimes brief you the specific steps to install the programs and also the requirements to fulfill before compile the source code.

Common open source programs source code comes with configure files and makefiles. Because those programs usually are cross platform compatible. That means it can be compile in different platform such as Unix, Linux, BSD etc, given the required library installed and the dependencies solved. Therefore, before start to compile and install, you usually need to configure.


Configure scripts will check whether all the libraries and dependency files are there or not. If it is not there it will pause and indicate you what is missing. At this moment, you need to search for the lib and install that before you can continue to configure.

Sometimes, the libraries are install, just the lib location are not the same as specified in config file, a good configure script, will have allow you to set some option, such as alternatives lib path, prefix of where you want to install the programs to. Display the options, you do this.

./configure --help 

When it is done, now you can compile your source code. To compile all the source code and produce the binaries, you do this


Some packages contain more than one programs, do

make all

To compile all and turn all into binaries.

The last steps, is to install, usually you need root privilege to install packages.

sudo make install

Some of the makefiles have other options such as uninstall, clean etc. So to uninstall, you can do this:

sudo make uninstall

What make install do is just copy the binaries created to specified path, and uninstall is just remove them from the specified directories. Makefiles and configure scripts sometimes might be vary, sometimes the tarball will tag alone with friendly script with names “”. You just need to run the run me script, It will configure, make and install for you.

5 Responses to “Installing From Tarballs”

  1. […] After finish download, you can follow the step show in Install From Tarball, you will need to enable a xspice feature: […]

  2. […] There are plenty of c and c++ compiler under unix based operating system, but the most famous one should be GNU gcc compiler. A well known open source kernel Linux is compiled by gcc as well. This post is to introduces you how you can use gcc to compile c and c++ source code, if you are looking at how to compile projects or packages which consist of configure and make files, please read Installing from tarballs. […]

  3. […] Unfortunately, autocutsel is not in Ubuntu repo (I doubt it is in any other distro’s repo too, but I am not too sure too.), you couldn’t apt-get it. Therefore, you need to download the source and compile by yourself. Check out the hints from installing from tarball if you have no idea how to compile. Related Posts cut and paste source code to consoleIf your vim have auto indent enabled, you may facing this problem. Vim are too smart to help you indent copied source co… Aligning contents of several files into columnsLet’s say you have 2 files with the following contents respectively: File A: a b c File B: 1 2 3 You can join… beware of non-ascii charactersWhen I copy source code from an ebook in pdf format and paste into vim, and I try to compile it fails. The reason it fai…                              […]

  4. I hardly leave a response, but i did a few searching and wound up here Installing From Tarballs » Linux by Examples. And I do have a few questions for you if you don’t mind. Could it be simply me or does it look like some of these responses come across like coming from brain dead individuals? :-P And, if you are writing at other sites, I would like to follow everything fresh you have to post. Would you list of every one of your shared pages like your Facebook page, twitter feed, or linkedin profile?

  5. […] able to discover the debian packages for Pidgin from this link. To install using tarballs , verify this […]

Leave a Reply