Building gnubg from source on Ubuntu

Here are some simple instructions to build gnubg straight from source on linux.  The example is using Ubuntu 8.10, but the steps should be similar for any type of linux.

Get the source code

Just download and unzip a snapshot of the code.  I just extracted the files to my home directory.

Setup development packages 

Now you need to setup the development tools to build gnubg, this will vary depending on your platform, these are the commands I needed to install the necessary packages with Ubuntu:

sudo apt-get update

sudo apt-get -y install autoconf
sudo apt-get -y install automake
sudo apt-get -y install libtool
sudo apt-get -y install libglib2.0-dev
sudo apt-get -y install libxml2-dev
sudo apt-get -y install libfreetype6-dev
sudo apt-get -y install libpng12-dev
sudo apt-get -y install flex
sudo apt-get -y install bison
sudo apt-get -y install python-dev
sudo apt-get -y install libgtk2.0-dev
sudo apt-get -y install libgtkglext1
sudo apt-get -y install libgtkglext1-dev
sudo apt-get -y install libgstreamer0.10-dev
sudo apt-get -y install libsqlite3-dev
sudo apt-get -y install libreadline5-dev

Open a terminal window and either type each command in individually or put them all in a batch file, say and run "sh" to get all the commands to run in one go.  The list of needed packages is in the INSTALL file, generally the build commands will tell you if a package is missing.

Build the source 

Now change to the directory containg the gnubg source and type the following commands in the terminal window:

sudo make install

Each command will take a little while to run.  If it all works ok you should be done - create a shortcut or run gnubg directly from the alt+f2 run window.

If any of these steps fail, you may be able to guess what's wrong (a package missing for example), it is quite likely that you will need to be quite familiar with linux and/or gnubg to overcome any issues though (e.g. a mistake in the latest code), so hopefully it will work first time!

posted at 12:48:33 on 09/19/08 by SuperflyJon - Category: Download and install