Friday 28 August 2009

Installing a package from the source in UBUNTU 9.04

Installing a package from source

  • Make sure you have all the necessary development tools (i.e. libraries, compilers, headers):
aryan@aryan-laptop~$sudo apt-get install build-essential
aryan@aryan-laptop~$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:
aryan@aryan-laptop~$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):
aryan@aryan-laptop~$cd /path/to/extracted/sourcefiles
aryan@aryan-laptop~$./configure
aryan@aryan-laptop~$sudo make
aryan@aryan-laptop~$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:
aryan@aryan-laptop~$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:
aryan@aryan-laptop~$sudo chmod +x configure

No comments:

Post a Comment