Gambas 3 – Compile and Install
Unfortunately Gambas 3 is not yet in any distribution repository yet (2012-07-21: no longer true. See comment below) so this involves installing Gambas 3 from source code. This might be intimidating for new Linux users so I have written this note to show a hopefully easy-to-follow process. These instructions work on all Ubuntu versions (I have only installed on 11.04 in Gnome rather than Unity desktop) as well as Linux Mint 11 and I guess most Ubuntu derivatives. The process is similar for other distributions.
Go to http://gambas.sourceforge.net/en/main.html and ‘Download Gambas 3’ using the button on the top right.
This will put a compressed file with extension .tar.bz2 in your Downloads directory (e.g. /home/fred/Downloads). Leave the webpage open as we will be needing it again.
Open your Nautilus file manager (on Mint for example click on ‘Fred’s Home’ on the desktop). Navigate to the Downloads folder and double click on the Gambas3-x.xx.x.tar.bz2 file (where x will be the current version number).
This will open the Archive Manager from which you can click the ‘Extract’ button. It does not matter where you place the extracted directory: it is easiest to leave it as a sub-directory in the Downloads directory.
Next we will need to open a terminal window. On Mint this is found under ‘Applications’, ‘Accessories’ and click on ‘Terminal’. The terminal window opens and the cursor is positioned at the end of a line which itself ends with ‘~ $’. We will be using terminal to do two things. The first is to install all the components that Gambas uses and the second is to compile and install the gambas source code itself.
On the Gambas webpage, click on ‘Compilation and Installation’. Go down (nothing like starting half way through the document!) to the section ‘How to compile and install Gambas on a specific distribution’ and click on Ubuntu.
This will list the dependency lists for the different versions of Ubuntu. Choose the relevant one for your distribution (Mint 11 is based on Ubuntu 11.04) and drag your mouse over the dependency list to select it. There is no specific entry for Ubuntu 11.10 (Oneiric) so just use the dependency list for Natty.
Hold down ‘ctrl’ key and press ‘c’ to copy this selection to the clipboard. Hold down ‘alt’ key and press ‘tab’ key until the terminal application is selected and then hold down ‘shift’ key and press ‘insert’ key to paste the dependency list into Terminal (you can also use the menu command Edit, paste). If you are using the Natty list for Oneiric, there is a problem with the entry kdelibs4-dev. Use the left arrow and change the 4 to 5 (i.e. kdelibs5-dev)
Press ‘enter’ key to run the very long ‘sudo apt-get install …’ line and supply a password. You will be advised which dependencies need to be downloaded. Press ‘y’ for yes to confirm. It will take a little time to download and install all these dependencies and will produce huge quantities of gibberish in the process. Eventually the cursor will return to the end of a new line ending ‘~ $’.
Next we need to change into the extracted Gambas source-code directory. From Terminal, type ‘cd /home/fred/Downloads/gambas3-x.xx.x’. ‘cd’ is the change directory command. fred is your home directory (change as required) and x.xx.x is once again the version of Gambas 3 which you have downloaded. Once you have correctly changed directory, the command line will end with the directory (e.g. ~/Downloads/gambas3-2.99.1) followed by $ rather than ‘~ $’.
Go back to the Gambas webpage and click on ‘Compilation and Installation’ again. Now we can start from the top. You will see that we have already completed the first instruction (cd). Each of the remaining compilation steps takes time and produces gibberish: don’t worry (be happy). Start with ‘./reconf-all’ and ‘enter’. Once you are back at the command line prompt type ‘./configure -C’ and ‘enter’. As you return to the command line prompt you should be given the message ‘All components will be compiled’. [2012/03/09: there is a new component under development. Don’t worry (be happy) if you are told that gb.gsl will not be compiled] . If you are warned that some components will not be compiled then it is likely that you have failed to install some of the necessary dependencies. Next up is the compilation itself so type ‘make’ and ‘enter’. Once back at the prompt, you install it all by typing ‘sudo make install’ -and ‘enter’. It will prompt for your password.
When you finally get back to the prompt, you should be in a position to run Gambas by typing ‘gambas3’ and ‘enter’. Gambas3 won’t be inserted into your menu system but you can create a desktop launcher. Right-click on the desktop and click on ‘create launcher’. Use ‘Gambas3’ as a name, ‘gambas3’ as a command. Leave the comment field empty. You can change the icon by clicking on it and navigating to the gambas3.svg icon in the app/desktop subdirectory of your installation package (which will typically still be in ‘/home/fred/Downloads/gambas3-x.xx.x’ or whatever). If you plan to delete the installation directory, then you will have to move this file somewhere safe.-