Ubuntu

The following instructions to install Gambas on Ubuntu are also applicable for Lubuntu, Kubuntu, Xubuntu, Linux Mint and other Ubuntu based distributions.

Gambas 3 binaries

Gambas 3 stable

Latest Gambas 3 binary packages can be found in a PPA made by the Gambas Team.

It allows you to install latest Gambas 3 stable version without compiling it!

First add the PPA to your sources.list. Open a terminal and do:

$ sudo add-apt-repository ppa:gambas-team/gambas3

Next update the sources and install Gambas:

$ sudo apt-get update
$ sudo apt-get install gambas3

After installation you will find Gambas 3 installed in menu 'Programming'.

Note that the stable repository holds binaries for armhf. These can be used on the Ubuntu/Lubuntu images for Banana Pi.

DO NOT USE the Gambas packages in the Ubuntu repository made for 12.04 (precise) up to 14.04 (trusty). They are wrong and an older version 3.1.1.
Note that as of Ubuntu 16.04 (xenial) the Gambas packages in the Ubuntu repository are for Gambas 3.8.4. As of Ubuntu (zesty) the Gambas packages are for Gambas 3.9.1.

Gambas 3 development version master

There are binary packages for the latest version on /trunk made daily by the Gambas Team.

It allows you to test the latest development version without having to compile it!

First add the PPA to your sources.list. Open a terminal and do:

$ sudo add-apt-repository ppa:gambas-team/gambas-daily

Next update the sources and install Gambas:

$ sudo apt-get update
$ sudo apt-get install gambas3

After installation you will find Gambas 3 installed in menu 'Programming'.

Note that the dialy build repository holds binaries for armhf. These can be used on the Ubuntu/Lubuntu images for Banana Pi.

DO NOT add the stable and trunk PPA at the same time! It is either stable or trunk.

Gambas 3 Compilation

Installing binaries with a package management system is ALWAYS preferred over compilation and installation.

Gambas 3 (version <= 3.4.2)

Step 1. Get the source code.

Note: See A note on installing from git.

Step 2. When installing first update the sources:

$ sudo apt-get update

Step 3. Install these development packages :

Hint: If you copy and paste this, put it into a text editor first and remove the line feeds before running on a command prompt!

To install the development packages needed to compile all Gambas components, open the terminal and give these commands:

$ sudo apt-get install build-essential g++ automake autoconf libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev postgresql-server-dev-9.3 libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libxtst-dev libffi-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgsl0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libcairo2-dev libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-dev

Note: For older versions of Ubuntu dependencies might have a too low version resulting in some components not being compiled.

For availability of packages in your specific distribution version see A note on package dependencies

Step 4. Go into the directory where the Gambas source files are located and run the script:

$ ./reconf-all

Step 5. Once this script is finished, you can run the common commands to compile and install a program under GNU/Linux:

$ ./configure -C
$ make
$ sudo make install

Step 6. Type gambas3:

Gambas should start and run.

Note: You can make a symlink to start gambas3.

Gambas 3 (version >= 3.5 and <= 3.6)

Step 1. Get the source code.

Note: See A note on installing from git.

Step 2. When installing first update the sources:

$ sudo apt-get update

Step 3. Install these development packages :

Hint: If you copy and paste this, put it into a text editor first and remove the line feeds before running on a command prompt!

To install the development packages needed to compile all Gambas components, open the terminal and give these commands:

$ sudo apt-get install build-essential g++ automake autoconf libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev postgresql-server-dev-9.3 libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev libesd0-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libglew1.5-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-dev libalure-dev libgmp-dev libgtk-3-dev libssl-dev

For more recent versions of Ubuntu you might need higher versions of dependencies than mentioned above.

For older versions of Ubuntu dependencies might have a too low version resulting in some components not being compiled.

For availability of packages in your specific distribution version see A note on package dependencies

Step 4. Go into the directory where the Gambas source file are located and run the script:

$ ./reconf-all

Step 5. Once this script is finished, you can run the common commands to compile and install a program under GNU/Linux:

$ ./configure -C
$ make
$ sudo make install

Step 6. Type gambas3

Gambas should start and run.

Note: You can make a symlink to start gambas3

Gambas 3 (version >= 3.7 and development version master)

Step 1. Get the source code.

Note: See A note on installing from git.

Step 2. When installing first update the sources:

$ sudo apt-get update

Step 3. Install these development packages :

Hint: If you copy and paste this, put it into a text editor first and remove the line feeds before running on a command prompt!

To install the development packages needed to compile all Gambas components, open the terminal and give these commands:

$ sudo apt-get install build-essential g++ automake autoconf libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev  libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev libalure-dev libgmp-dev libgtk-3-dev libssl-dev libqt5webkit5-dev postgresql-server-dev-11 libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev libqtwebkit-dev libqt5x11extras5-dev gir1.2-gmime-3.0

Note: The postgresql-server-dev-X.Y package includes the postgresql version number in its name, so you will have to update it according to the actual package of your distribution.

For example, with Ubuntu 16.04, you have to replace postgresql-server-dev-9.3 by postgresql-server-dev-9.5.

For availability of the postgresql-server-dev-X.Y package for your specific distribution version see A note on package dependencies

For version on /trunk and 3.8 or higher add:

$ sudo apt-get install libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev

Note: For /trunk version you might need to install more dependencies as new components get developed. For more recent versions of Ubuntu you might need higher versions of dependencies than mentioned above.

For older versions of Ubuntu dependencies might have a too low version resulting in some components not being compiled. E.g Version on /trunk and 3.8 or higher needs qt5 packages for version 5.3 or higher (Ubuntu 12.04 and 14.04 have qt5 packages for version 5.2).

For availability of packages in your specific distribution version see A note on package dependencies

Step 4. Go into the directory where the Gambas source files are located and run the script:

$ ./reconf-all

Step 5. Once this script is finished, you can run the common commands to compile and install a program under GNU/Linux:

$ ./configure -C
$ make
$ sudo make install

Step 6. Type gambas3

Gambas should start and run.

Note: You can make a symlink to start gambas3

Compile Gambas3 from git on Ubuntu 18.04, 19.04, 20.04, 22.04

Hint: If you copy and paste this, put it into a text editor first and remove the line feeds before running on a command prompt!

To install the development packages needed to compile all Gambas components, open the terminal and give these commands:

Step 1. Install dependencies:

for Ubuntu 18.04

$ sudo apt-get update && apt install build-essential g++ automake autoconf libtool libbz2-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libmysqlclient-dev postgresql-server-dev-10 libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libqtwebkit-dev libqt4-opengl-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev libssl-dev libcanberra-gtk-module git

for Ubuntu 19.04

$ sudo apt-get update && apt-get install build-essential g++ automake autoconf libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev  libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev libalure-dev libgmp-dev libgtk-3-dev libssl-dev libqt5webkit5-dev postgresql-server-dev-11 libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev libqtwebkit-dev libqt5x11extras5-dev

for Ubuntu 20.04

$ sudo apt-get update && apt-get install -y build-essential g++ automake autoconf libtool libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev postgresql-server-dev-12 libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-private-dev libpoppler-glib-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev git

for Ubuntu 22.04

$ sudo apt-get update && apt-get install -y build-essential g++ automake autoconf libtool libbz2-dev libzstd-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-private-dev libpoppler-glib-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-3.0-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev git

Step 2. Clone source code from git:

for develop version
$ git clone --depth=1 https://gitlab.com/gambas/gambas.git gambasdevel
for latest stable version
$ git clone --branch stable --depth=1 https://gitlab.com/gambas/gambas.git gambastable

Step 3. Change to the folder containing the cloned source code:

for develop version
$ cd gambasdevel
for latest stable version
$ cd gambasstable

Step 4.
$ ./reconf-all && ./configure -C

Step 5.
$ make

Step 6.
$ sudo make install

Important notes

A note on installing from git

If you want to compile the latest development version or a stable version from Gitlab Gambas repository, you need to install git first.

To do this open a terminal and do:

$ sudo apt-get install git

You will now be able to do a git clone or git checkout.

Downloading Gambas from Gitlab repository

Everybody can make a copy of the repository on his hard disk by using the following command:

for develop version
$ git clone --depth=1 https://gitlab.com/gambas/gambas.git
for current stable version
$ git clone --branch stable --depth=1 https://gitlab.com/gambas/gambas.git
for an specific old stable version (e.g. 3.6)
$ wget https://gitlab.com/gambas/gambas/repository/v3.6.0/archive.tar.gz -O gambas-3.6.0.tar.gz
$ tar -zxvf gambas-3.6.0.tar.gz
$ cd gambas-v3.6.0-*

For more info about using Gitlab Gambas repository see How to deal with Git and Gitlab for Gambas.

A note on package dependencies

As dependencies may change over time it is always a good thing to know what is available on Ubuntu and in what repository.

Check Ubuntu Package Search for the availability of needed dependency packages on Ubuntu.

If you scroll down on the page you can search for a package and find out what repositories hold them.

Note: For Linux Mint users figure out the Ubuntu version your Linux Mint version is based on. Next use Ubuntu Package Search for this Ubuntu version to figure out what package is available.

Gambas 2

See the old deprecated instructions.


Page revisions:


Ubuntu Gambas 3 instructons by: W. Raets - Sept 8th, 2013
- updated: Aug 8th, 2017 by W. Raets (gbWilly)
- updated: Nov 9th, 2018 by Gianluigi Gradaschi
- updated: Apr 21th, 2023 by W. Raets (gbWilly)
--> Added Ubuntu 22.04 to "Compile Gambas3 from git"
--> Some layout improvements
- updated: June 28th, 2023 by W. Raets (gbWilly)
--> Some minor corrections