Installing packages from source in Gnu/Linux


Packages come
in two formats in Gnu/Linux

1.) rpm

2.) Source

In this
document we will be installing source packages.

packages generally come in 2 compressed formats

–compressed with bunzip(bzip)

–compressed with gunzip(gzip)

and others

1.)first of all
we need to extract these packages .

so copy the
packages in your Gnu/Linux partition. for example in /plugins directory.

go to that
directory and extract them as follows

root]# cd /plugins/

plugins]# tar xjf xmms-1.2.10.tar.bz2



root]# cd /plugins/

plugins]# tar xvzf xmms-1.2.10.tar.gz


here we pass
the arguments

xjf –for
uncompressing packages of the type (.tar.bz2)

xvzf –for
uncompressing packages of the type (.tar.gz)

more on these
attributes can be found by

root]# man tar

if the
packages are in some another format then u can extract them also by

a.)copy the
package in your Gnu/Linux partition

b.)Right click
on the package

extract here

this method
surely takes some time more that the command line version but if you are having
any problems in extracting
with the command line then u may proceed in this manner

2.)after packages
have been extracted then u need to compile them and then install these.

you can go
through a file Readme or INSTALL

in all the
install readme files you will find the procedure for installing source packages

I am briefing
the procedure down here

a.) go to the
directory containing the extracted packages

root]# cd /plugins/xmms-1.2.10


b.) ‘./configure’
will check if the files necessary for installation are available or not

[root@gaurav xmms-1.2.10]#

c.)’ make’ will
compile the package

xmms-1.2.10]# make

d.)’make install’
will install the executable in ‘/usr/local/bin’ (generally)

after these
you can run your new packages by their name only or by giving the full path

xmms-1.2.10]# xmms


xmms-1.2.10]# /usr/local/bin/xmms

on installing packages

i) Sometimes it
may happen that during ‘./configure’ u may get a message that such file is not
found, say


it may happen
that the file is in your system but it is not in those directories where the
compiler might be

searching so
in that case first lookout whether if your system does have that file

first of all
update your database of files by

root]# updatedb

then you will
be able to locate your file by

root]# locate





[ root@gaurav

Now you have 2

Either make a
link or copy the entire file

for example is in ‘/usr/local/lib’

and we want it
to be in ‘/lib’

To make a link
for that file

root]# ln -s /usr/lib/ /lib/

this will
create a link in /lib for the file

so when the
compiler look out for libasound .so in /lib instead it will find a link there
which will redirect it


you can copy that file from ‘/usr/local/lib’ to ‘/lib’ but then some program
might be

looking for
the same file in ‘/usr/local/lib’

so it is
advisable to use links since they save a lot of space

ii) Try to
uncompress the packages with the command line options.

with the right-click option may make your system to stop responding

if your system
stops responding in that case

Ctrl+Esc will
bring the process table

choose the
process which may cause such activity

in this case
you have ‘Ark’ utility
responsible for uncompressing the package

so choose the
appropriate process and kill it to remove it from the process table

iii) See that you
have appropriate space for extracting and compiling the packages sometime

they take a
lot of space for example

While I
extract my kernel of 32 Mb it uncompressed to around 130Mb and to compile it I
need an extra space of
around 150 Mb!!!

iv) after the
packages have been installed you can remove the object files from the package

xmms-1.2.10]# make clean

this will
remove the object(.o)files which were required only during compile time

also you can
remove the package instead from /plugins to save disk space since aftar the
command ‘make install’ the
required libraries and other files have been installed in ‘/usr’

v) installing
with rpm is easier since they are precompiled and they take less time but they
are version and distribution
specific so you will not get .rpm files for your version of Gnu/Linux, instead
source packages are the same so you
will get them everywhere


Leave a Reply

Your email address will not be published. Required fields are marked *