Before going any further, consider using the .deb packages at; http://encryptec.net/software/gambas-packages
These instructions may well work with previous versions of Ubuntu, but I would strongly recommend upgrading to 7.04 before going any further. If you want to find the exact package versions supported on a given release of Ubuntu, it will take time. If you can upgrade first the procedure below should get you going 'first time'.
sudo apt-get install libbz2-dev libgnorba-dev omniorb4 libfbclient1 libmysqlclient15-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libgtk2.0-dev libldap2-dev libcurl3-dev libgtkglext1-dev libqt3-mt-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev build-essential libbonobo2-dev libcos4-dev libomniorb4-dev firebird2-dev librsvg2-dev libpoppler-qt-dev libpoppler-qt4-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libartsc0-dev libesd0-dev libesd-alsa0 libdirectfb-dev libaa1-dev
cd /usr/src tar xvfj /home//Desktop/gambas2-1.48.tar.bz2
cd /usr/src/gambas2-1.9.48 ./configure -C make make install
This should leave you with a working version of Gambas in usr local bin .. so if you now type in "gambas2" from the terminal session, it should start your nice new IDE.
Gareth Bult