Installing a package from source

On August 24, 2009, in install, package, source, by Dipin Krishna
  • Make sure you have all the necessary development tools (i.e. libraries, compilers, headers):
sudo apt-get install build-essential
sudo apt-get install linux-headers-`uname -r`

Note: “uname -r” lists the current kernel you are using
  • Extract the archive that contains the source files:
tar xvf sourcefilesarchive.tar.gz

  • Build the package using the package’s script (in this case the configure script), compile the package (make), and install the compiled package into your system (make install):
cd /path/to/extracted/sourcefiles
./configure
sudo make
sudo make install

Note: typing ./ before a filename in the current folder allows the Linux shell to try and execute the file as an application even if it is not in the path (the set of folders which it searches when you type a command name). If you get a “permission denied” error, the file is not marked as being executable. To fix this:
sudo chmod +x filename

Example: In the above instructions, configure is the shell script to build the package from source. To be sure the configure script is executable:
sudo chmod +x configure
 

Leave a Reply

*

Search