Gambas Documentation - /install/debian

# Debian

- Gambas 3 binaries

  - For wheezy

    - Gambas 3.1.1

  - For jessie

    - Gambas 3.5.4

  - For sid

    - Gambas 3.5.4

- Gambas3 compilation

  - Compilation from sources (wheezy - stable)

    - Gambas 3 (version <= 3.4.2)

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

    - Gambas 3 (version >= 3.7 and development version on /trunk)

  - Compilation from sources (jessie and sid)

    - Gambas 3 (version <= 3.4.2)

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

    - Gambas 3 (version >= 3.7 and development version on /trunk)

- Important notes

  - A note on installing from svn

  - Downloading Gambas from Subversion repository

  - Trouble with sudo

  - A note on package dependencies

- Screenshots

  - Debian wheezy

    - Debian wheezy LXDE running Gambas 3.5.4, using jessie repository

    - Debian wheezy running Gambas 3.5.2, using jessie repository

    - Debian wheezy running Gambas 3.4.2 compiled from source

The following instructions to install Gambas on Debian are also applicable for Linux Mint Debian (LMDE) and other Debian (non Ubuntu) based distributions.

## Gambas 3 binaries

### For wheezy

#### Gambas 3.1.1

Official repository for wheezy has Gambas 3.1.1 available.

All it takes is opening a terminal and enter these commands:

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

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

### For jessie

#### Gambas 3.5.4

Official repository for jessie has Gambas 3.5.4 available.

Open a terminal and enter these commands:

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

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

### For sid

#### Gambas 3.5.4

Official repository for sid has Gambas 3.5.4 available.

Open a terminal and enter these commands:

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

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

## Gambas3 compilation

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

### Compilation from sources (wheezy - stable)

#### Gambas 3 (version <= 3.4.2)

Step 1. Get the source code (either download and extract the package from main Gambas website or use svn checkout)

Note: For using svn checkout see A note on installing from svn and Downloading Gambas from Subversion repository

Step 2. Open a terminal (make sure your user account is part of sudo group)

Step 3. When installing first update the sources:

    $ sudo apt-get update

Step 4. Install these packages :

    $ sudo apt-get install build-essential g++ automake autoconf libbz2-dev libfbclient2 libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev libesd0-dev libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs5-dev firebird-dev libqt4-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgsl0-dev libncurses5-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libcairo2-dev libgmime-2.6-dev llvm-3.1-dev

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

    $ ./reconf-all

Step 6. 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 7. 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 (either download and extract the package from main Gambas website or use svn checkout)

Note: For using svn checkout see A note on installing from svn and Downloading Gambas from Subversion repository

Step 2. Open a terminal (make sure your user account is part of sudo group)

Step 3. When installing first update the sources:

    $ sudo apt-get update

Step 4. Install these packages :

    $ 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 libsage-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libesd0-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-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 libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-3.4-dev libalure-dev libgmp-dev libgtk-3-dev

NOTE

When running above line those packages missing in Debian wheezy will be mentioned. For the availability of these packages see A note on package dependencies
For example your missing packages are in the jessie repository. Open sources.list with nano editor.

    $ sudo nano -w /etc/apt/sources.list

Add these lines to sources.list :

    deb http://ftp.nl.debian.org/debian/ jessie main
    deb-src http://ftp.nl.debian.org/debian/ jessie main

Save the result (`<ctrl> + O -> <enter>`) and close the sources.list (`<ctrl> + X`)

Next update the sources and install the missing packages (or better use apt preferences):

    $ sudo apt-get update
    $ sudo apt-get install <name-of-missing-package-01> <name-of-missing-package-02> ...

Doing sudo apt-get update and upgrade later on, will pull in a lot more and might mess up your system install.
So directly after the installation of the missing packages it is strongly advised to remove the jessie entry from sources.list.
For this do:

    $ sudo nano -w /etc/apt/sources.list

Add # to these lines in the sources.list to comment them out:

    #deb http://ftp.nl.debian.org/debian/ jessie main
    #deb-src http://ftp.nl.debian.org/debian/ jessie main

Save the result (`<ctrl> + O -> <enter>`) and close the sources.list (`<ctrl> + X`)

If you do want to keep both wheezy and jessie in the sources.list and not mess up your system, the have a look at Apt Preferences, as it explains how to grab packages from a later release but leave the rest as-is.

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

    $ ./reconf-all

Step 6. 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 7. Type gambas3

Gambas should start and run.

Note: You can make a symlink to start gambas3

#### Gambas 3 (version >= 3.7 and development version on /trunk)

Step 1. Get the source code (either download and extract the package from main Gambas website or use svn checkout)

Note: For using svn checkout see A note on installing from svn and Downloading Gambas from Subversion repository

Step 2. Open a terminal (make sure your user account is part of sudo group)

Step 3. When installing first update the sources:

    $ sudo apt-get update

Step 4. Install these packages :

    $ 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 libsage-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libesd0-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-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 libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-3.4-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils

Note: For trunk version you might need to install more dependencies as new components get developed.
For availability of packages in your specific distribution version see A note on package dependencies

NOTE

When running above line those packages missing in Debian wheezy will be mentioned. For the availability of these packages see A note on package dependencies
For example your missing packages are in the jessie repository. Open sources.list with nano editor.

    $ sudo nano -w /etc/apt/sources.list

Add these lines to sources.list :

    deb http://ftp.nl.debian.org/debian/ jessie main
    deb-src http://ftp.nl.debian.org/debian/ jessie main

Save the result (`<ctrl> + O -> <enter>`) and close the sources.list (`<ctrl> + X`)

Next update the sources and install the missing packages (or better use apt preferences):

    $ sudo apt-get update
    $ sudo apt-get install <name-of-missing-package-01> <name-of-missing-package-02> ...

Doing sudo apt-get update and upgrade later on, will pull in a lot more and might mess up your system install.
So directly after the installation of the missing packages it is strongly advised to remove the jessie entry from sources.list.
For this do:

    $ sudo nano -w /etc/apt/sources.list

Add # to these lines in the sources.list to comment them out:

    #deb http://ftp.nl.debian.org/debian/ jessie main
    #deb-src http://ftp.nl.debian.org/debian/ jessie main

Save the result (`<ctrl> + O -> <enter>`) and close the sources.list (`<ctrl> + X`)

If you do want to keep both wheezy and jessie in the sources.list and not mess up your system, the have a look at Apt Preferences, as it explains how to grab packages from a later release but leave the rest as-is.

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

    $ ./reconf-all

Step 6. 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 7. Type gambas3

Gambas should start and run.

Note: You can make a symlink to start gambas3

### Compilation from sources (jessie and sid)

#### Gambas 3 (version <= 3.4.2)

Step 1. Get the source code (either download and extract the package from main Gambas website or use svn checkout)

Note: For using svn checkout see A note on installing from svn and Downloading Gambas from Subversion repository

Step 2. Open a terminal (make sure your user account is part of sudo group)

Step 3. Install these packages :

    $ sudo apt-get install build-essential g++ automake autoconf libbz2-dev libfbclient2 libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libldap2-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsage-dev libxml2-dev libxslt1-dev libbonobo2-dev libcos4-dev libomniorb4-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libasound2-dev libesd0-dev libdirectfb-dev libaa1-dev libxtst-dev libffi-dev kdelibs5-dev firebird-dev libqt4-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgsl0-dev libncurses5-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgmime-2.6-dev llvm-3.4-dev

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.5 and <= 3.6)

Step 1. Get the source code (either download and extract the package from main Gambas website or use svn checkout)

Note: For using svn checkout see A note on installing from svn and Downloading Gambas from Subversion repository

Step 2. Open a terminal (make sure your user account is part of sudo group)

Step 3. Install these packages :

    $ 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 libsage-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libesd0-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-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 libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-3.4-dev libalure-dev libgmp-dev libgtk-3-dev

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 on /trunk)

Step 1. Get the source code (either download and extract the package from main Gambas website or use svn checkout)

Note: For using svn checkout see A note on installing from svn and Downloading Gambas from Subversion repository

Step 2. Open a terminal (make sure your user account is part of sudo group)

Step 3. Install these packages :

    $ 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 libsage-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libasound2-dev libesd0-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-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 libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-3.4-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils

Note: For trunk version you might need to install more dependencies when new components get developed.
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

## Important notes

### A note on installing from svn

If you want to compile the latest `/trunk` development version or a stable version from svn, you need to install subversion first.

To do this open a terminal and do:

    $ sudo apt-get install subversion

You will now be able to do a svn checkout.

### Downloading Gambas from Subversion repository

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

For trunk version

    $ svn checkout svn://svn.code.sf.net/p/gambas/code/gambas/trunk

For current stable version (3.7)

    $ svn checkout svn://svn.code.sf.net/p/gambas/code/gambas/branches/3.7

For an old stable version (e.g. 3.3)

    $ svn checkout svn://svn.code.sf.net/p/gambas/code/gambas/branches/3.3

### Trouble with sudo

When you issue your first sudo command in terminal it might give you trouble on Debian (see illustration below).

This simply means you have insufficient user privileges. To deal with this problem add your user to the group sudo.

These are the steps to correct this problem:

1. Open a terminal and type:

    $ su root

Enter the root password and hit <enter>.

2. Type:

    $ adduser USERNAME sudo

Replace USERNAME with your account name.

3. Type (yes do it twice):

    $ exit
    $ exit

4. Reboot Debian and when started again sudo will work in a terminal for the user you added to sudo group.

### A note on package dependencies

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

Check Debian packages overview for the availability of needed dependency packages on Debian.

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

Search for package llvm-3.2-dev shows us it is only available for jessie and sid

## Screenshots

### Debian wheezy

#### Debian wheezy LXDE running Gambas 3.5.4, using jessie repository

#### Debian wheezy running Gambas 3.5.2, using jessie repository

#### Debian wheezy running Gambas 3.4.2 compiled from source

`Debian Gambas 3 instructons by: W. Raets - Sept 8th, 2013
` `- Last updated: April 3h, 2015 by W. Raets (gbWilly)
`