Ubuntu
Last edit: 2024-06-15 by gbWilly
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:
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.
Step 4. Go into the directory where the Gambas source files are located and run the script:
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:
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.
Step 4. Go into the directory where the Gambas source file are located and run the script:
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 <= 3.15)
Step 1. Get the source code.
Note: See A note on installing from git.
Step 2. When installing first update the sources:
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 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).
Step 4. Go into the directory where the Gambas source files are located and run the script:
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 -j$(nproc)
$ sudo make install
Step 6. Type gambas3
Gambas should start and run.
Note: You can make a symlink to start gambas3
Gambas3 (version >= 3.19 and development version) from git
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-get install -y build-essential git 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 libqt4-dev libqtwebkit-dev libqt4-opengl-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 libfribidi-dev
- for development version add:
$ apt-get install -y libmongoc-dev
for Ubuntu 19.04
$ sudo apt-get update && apt-get install -y build-essential git 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-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 libfribidi-dev
- for development version add:
$ apt-get install -y libmongoc-dev
for Ubuntu 20.04
$ sudo apt-get update && apt-get install -y build-essential git 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 libfribidi-dev
- for development version add:
$ apt-get install -y libmongoc-dev
for Ubuntu 22.04
$ apt-get update && apt-get install -y build-essential g++ automake autoconf libtool libbz2-dev libzstd-dev libmysqlclient-dev unixodbc-dev libpq-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
- for development version add:
$ apt-get install -y qt6-svg-dev qt6-base-dev qt6-webengine-dev libmongoc-dev
for Ubuntu 24.04
$ apt-get update && apt-get install -y build-essential g++ automake autoconf libtool libbz2-dev libzstd-dev libmysqlclient-dev unixodbc-dev libpq-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.1-dev git
- for development version add:
$ apt-get install -y qt6-svg-dev qt6-base-dev qt6-webengine-dev libmongoc-dev
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
for latest stable version
Step 4.
for Ubuntu 18.04
$ ./reconf-all
$ ./configure -C --disable-keyring --disable-qt6
for Ubuntu 19.04 and 20.04
$ ./reconf-all
$ ./configure -C --disable-keyring --disable-qt4 --disable-qt6
for Ubuntu 22.04 and 24.04
$ ./reconf-all
$ ./configure -C --disable-keyring --disable-qt4 --disable-sqlite2
Step 5.
Step 6.
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.
What are the latest dependencies to install
As dependencies change over time it is always a good thing to know what you need to install for what Ubuntu version.
Check
gitlab-ci.yml for the exact needed dependencies to install latest Gambas3 on Ubuntu.
Search for your corresponding Ubuntu version and follow the exact instructions there.
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)
- updated: June 15th, 2024 by W. Raets (gbWilly)
- renamed "Compile Gambas 3 from git" to "Gambas3 (version >= 3.19 and development version) from 'git'"
- updated all dependencies in "Gambas3 (version >= 3.19 and development version) from 'git'"
- added instructions for 24.04 to "Gambas3 (version >= 3.19 and development version) from 'git'"
- Added "What are the latest dependencies to install"
- some cleanup of obsolete links