How to install tarball packages on a Debian based distribution?

Firstly, according to the File System Hierarchy Standards, the location of this installed package should be /opt if it is a binary install and /usr/local if it's a from source install.

Pure binaries

These are ready to use binaries. Normally they just need to be extracted to be installed. A binary package is going to be easy:

  • sudo tar --directory=/opt -xvf <file>.tar.[bz2|gz]
  • add the directory to your path: export PATH=$PATH:/opt/[package_name]/bin

and you are done.

From sources

A source package is going to be more troublesome (by far) and through they can roughly be processed with the method below, each package is different:

  • download the package to /usr/local/src
  • tar xf <file>.tar.[bz2|gz]
  • cd <package name>
  • read the README file (this almost certainly exists).
  • most Open Source projects use autoconf/automake, the instructions should be in the README. Probably this step will go: ./configure && make && make install (run the commands separately for sanity if something goes wrong though).

If there's any problems in the install then you'll have to ask specific questions. You might have problems of incorrect versions of libraries or missing dependencies. There's a reason that Debian packages everything up for you. And there is a reason Debian stable runs old packages - finding all the corner cases of installing packages on more than a dozen different architectures and countless different hardware/systems configurations is difficult. When you install something on your own you might run into one of these problems!


Unpack the files and then, in the directory that was created, look for a README or INSTALL file which will tell you what you need to know in order to install a package (e.g. dependencies, configuration options, commands to run etc...).

Usually it boils down to ./configure, make then make install.


The standard way of doing this is:

  1. tar zxvf file.tar.gz or tar xvjpf file.tar.bz2
  2. run ./configure (./configure --help usually gives customization options)
  3. run make
  4. run make install

There is usually a README or INSTALL file that gives instructions as well.