Ubuntu
Last edit: 2025-02-16 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
DO NOT add the stable and master repositories at the same time! It is either stable or master.
Installing master version from openSUSE build server
In your Ubuntu installation, open a terminal and enter these commands with elevated rights (sudo):
For Ubuntu 20.04 focal:
$ echo \'deb http://download.opensuse.org/repositories/home:/gambas:/master/xUbuntu_20.04/ /\' | sudo tee /etc/apt/sources.list.d/home:gambas:master.list
$ curl -fsSL https://download.opensuse.org/repositories/home:gambas:master/xUbuntu_20.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_gambas_master.gpg > /dev/null
For Ubuntu 22.04 jammy:
$ echo \'deb http://download.opensuse.org/repositories/home:/gambas:/master//xUbuntu_22.04/ /\' | sudo tee /etc/apt/sources.list.d/home:gambas:master.list
$ curl -fsSL https://download.opensuse.org/repositories/home:gambas:master//xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_gambas_master.gpg > /dev/null
For Ubuntu 24.04 noble:
$ echo \'deb http://download.opensuse.org/repositories/home:/gambas:/master//xUbuntu_24.04/ /\' | sudo tee /etc/apt/sources.list.d/home:gambas:master.list
$ curl -fsSL https://download.opensuse.org/repositories/home:gambas:master//xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_gambas_master.gpg > /dev/null
Next do:
For upgrade from official:
For fresh install:
$ sudo apt-get install gambas3
After upgrading from official you might need to follow up with this to fully upgrade gambas3 to master version:
$ sudo apt --fix-broken install
$ sudo apt-get install gambas3
Installing stable version from openSUSE build server
If you have previously installed master from openSUSE build server make sure to first (with elevated rights) do:
$ sudo rm -fr /etc/apt/sources.list.d/home:gambas:master.list
$ sudo rm -fr /etc/apt/trusted.gpg.d/home_gambas_master.gpg
In your Ubuntu installation, open a terminal and enter these commands with elevated rights (sudo):
For Ubuntu 20.04 focal:
$ echo \'deb http://download.opensuse.org/repositories/home:/gambas:/stable/xUbuntu_20.04/ /\' | sudo tee /etc/apt/sources.list.d/home:gambas:stable.list
$ curl -fsSL https://download.opensuse.org/repositories/home:gambas:stable/xUbuntu_20.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_gambas_stable.gpg > /dev/null
For Ubuntu 22.04 jammy:
$ echo \'deb http://download.opensuse.org/repositories/home:/gambas:/stable//xUbuntu_22.04/ /\' | sudo tee /etc/apt/sources.list.d/home:gambas:stable.list
$ curl -fsSL https://download.opensuse.org/repositories/home:gambas:stable//xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_gambas_stable.gpg > /dev/null
For Ubuntu 24.04 noble:
$ echo \'deb http://download.opensuse.org/repositories/home:/gambas:/stable//xUbuntu_24.04/ /\' | sudo tee /etc/apt/sources.list.d/home:gambas:stable.list
$ curl -fsSL https://download.opensuse.org/repositories/home:gambas:stable//xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_gambas_stable.gpg > /dev/null
Next do:
For upgrade from official:
For fresh install:
$ sudo apt-get install gambas3
After upgrading from official you might need to follow up with this to fully upgrade gambas3 to master version:
$ sudo apt --fix-broken install
$ sudo apt-get install gambas3
Setup a local Gambas3 Ubuntu repository
An alternative to the official packages is local repositories available at
Gambas3 Debian/Ubuntu Repository at Gitlab. The Download folder of the repository holds a variety of Gambas version repositories for Ubuntu 20.04, 22.04 and 24.04
Available Gambas3 version for Ubuntu 20.04 focal
- Starts with gambas 3.15.2 and upward for amd64. See
here for more details.
Available Gambas3 version for Ubuntu 22.04 jammy
- Starts with gambas 3.16.3 and upward for amd64. See
here for more details.
Available Gambas3 version for Ubuntu 24.04 noble
- Starts with gambas 3.19.6 and upward for amd64. See
here for more details.
How to set up?
From above referenced pages you can download and extract a repository archive holding the donwloaded gambas3 version repository, a ReadMe file and an installation script. Installing is as simple as running the script according to the provided instruction in ReadMe file and Gambas should be installed.
Gambas 3 Compilation
Installing binaries with a package management system is ALWAYS preferred over compilation and installation.
For the latest ubuntu and gambas versions there are automatically updated instructions of needed packages and install commands listed here
https://gambaswiki.org/edit/install#t13
The instructions below were made for older gambas versions before the above mentioned automatically updated listings were created. these are manually edited and could possibly now be outdated.
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
- updated: Feb 16th, 2025 by W. Raets (gbWilly)
- Complete redo of 'Gambas3 binaries'
- added 'Setup a local Gambas3 Ubuntu repository'