воскресенье, 17 октября 2010 г.

Compiling from source (tarball)

You havent found your favourite program in packages?
Or you want to use extra program?
You want rebuild or reconfigure program?
Then compile compile compile

Firstly fetch source tarball of program (.tar.gz)

Extract it
# tar -xf arch.tar
or use GUI application like Archive Manager


Go to that directory
# cd app-0.1


Run ./configure script.It checks if everything is OK (libs,compilers)
# ./configure
(Be aware that ./configure sometimes cant be in archive then skip this process)


If it is not OK or it prints errors or that something is missing then google it or search library development packages.
For example: 
I am compiling OpenGL program...
Configuring...
And it prints "Missing library OpenGL" or sometnihg like that
Then i install needed development library
In my case libgl-mesa-dev
# sudo apt-get install libgl-mesa-dev
You can search in Synaptic etc.
(Note the -dev prefix!!!)


When all is OK  we are able to build it.
# make


Install:
# make install
or
# sudo make install


And clean:
# make clean


Sometimes is possible to do # make help and choose what you want ;)

Комментариев нет:

Отправить комментарий