Dec 30, 2007

Compile Tarball (Beginner)



I've got a lot of question from new linux user on how to compile(install is the term for Windows user) a tarball/from source. I'm tired of telling each one of them how to compile. So here is the best way to make it simple. I wrote this base on Ubuntu(One of linux's famous distro nowadays) distro.

Basic thing to have before compiling the tarball is to prepare your system/kernel with all the dependencies. Here is the simple way to get all the dependencies:
  • sudo apt-get install bcp build-essential libcegui-mk2-dev libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libglu1-mesa-dev libgl1-mesa-dev
Just copy and paste the command line above into your terminal which can be access from Application>Accessories>terminal.

After finish installing the files/dependencies, you need to un"tar" the tarball by typing tar -zxvf filename.tar.gz (filename depends on the name of your source file/tarball)

then go to the "filename" directory by typing cd filename and configure the file. You can configure the files by using ./configure command. The kernel will configure the source to get ready for the next step which is 'make'.

after terminal finish configuring your source, type make in the terminal. Then the next step is sudo make install. After that the source is fully compile and ready to use. All you need to do is run the application by terminal, or Alt+F2.

Here is the summary for the step from beginning to the end:
  1. sudo apt-get install bcp build-essential libcegui-mk2-dev libsdl1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libglu1-mesa-dev libgl1-mesa-dev
  2. tar -zxvf filename.tar.gz <----filename depends on your tarball name
  3. cd filename
  4. ./configure
  5. make
  6. sudo make install
Walla!! you've just finished compiling your first application from source.


Thank you for your unbelievable support on Negative Zero - Permission to read and write blog for nearly 4 years. Don't forget to like Negative Zero on Facebook.
Blogirific.com Blog Directory





Post(s) you might like to read :

3 comments: