Generally Ubuntu users used Synaptic Package Manager for GUI and apt package manager for command line for installing packages. But not all latest application’s provides pre compiled packages for system, In that case you need to compile it using source code for installing application on your system.
This article will help you for installing packages using source archive on Ubuntu systems.
Prerequisites
Before working with the compilation of source package, First we need to prepare our system with requirements for compilation.
$ sudo apt-get install apt-file autoconf build-essential checkinstall
Extract Source Package
Firstly download the source archive on your system and extract it. Mostly users select home directory, /opt or Desktop for extracting package but we prefer to use /usr/local/src/ directory for extracting source of packages.
$ cd /usr/local/src/ $ tar -xzf myapp-1.5.tar.gz or $ tar -xjf myapp-1.5.tar.bz2
Compile and Install from Source
Now navigate to extracted directory and look for one of files INSTALL or INSTALL.txt or README.
$ cd /usr/local/src/myapp-1.5
These files contains the compilation steps for that source application. If you do not found them, Most of applications can be compiled using following commands.
$ ./configure $ make $ sudo make install
Install Missing Libraries
During compilation of packages if you get any messages for missing library requirements. First use apt-file command to search respective package for that file.
$ apt-file search <missing file name with extension>
Install the package searched using above command.
$ sudo apt-get install <package name>