Computing: Free Pascal Programming

Installing Lazarus/Free Pascal on Debian based systems.


Concerning this document, please note the following:

Operating systems overview.

The following table gives an overview of the operating systems, that I tested, with their version, the installation method, that I used, the version of Lazarus that was installed1 and an indication, where to look for further details. In the following paragraphs, I will give details concerning the different operating systems and discuss the problems that I encountered.

Operating systemVersionInstall methodLazarusNotes
BioLinux8AptGet1.0.10Cf. Ubuntu tutorial
Debian11.4AptGet2.0.10Cf. Ubuntu tutorial and Debian paragraph below
Deepin Desktop20.5Deepin AppStore2.0.0No installation issues. Cf. Deepin paragraph below
elementary OS6.1AptGet2.0.6No installation issues. Cf. Ubuntu tutorial
Kali Linux2021 4aAptGet2.2.0Cf. Ubuntu tutorial and Kali Linux paragraph below
Linux Lite6.0Apt from ok2cqr/lazarus repository2.2.0Cf. Linux Lite paragraph below
Linux Mint20.3Not installed22.0.6I suppose that you can proceed as described in my Ubuntu tutorial
MX Linux21.1AptGet + MX Package Installer2.0.10Incomplete install with AptGet! Cf. MX Linux paragraph below
Parrot OS Security5.0.1Various2.2.0/2.0.10Failure! Cf. Parrot OS paragraph below
SemiCode OS1.0AptGet1.0.10Cf. Ubuntu tutorial and SemiCode OS paragraph below
Ubuntu18.04AptGet1.8Cf. detailed Ubuntu 18.04 tutorial
20.04AptGet2.0.6Cf. Ubuntu tutorial
Zorin OS16.1Apt from ok2cqr/lazarus repository2.0.6No installation issues. Cf. Zorin OS paragraph below

Lazarus/FPC on Debian.

When you launch Lazarus for the first time, as on all other platforms, it's the Configure Lazarus IDE window that shows up. In the case of my Lazarus installation on Debian, a problem was reported concerning the IDE itself: Wrong version in ide/version.inc: 2.0.10+dsfg-4, with the actual version being 2.0.10+dsfg-4+b2, as you can see in the window's title bar on the screenshot.

Lazarus/FPC on Debian: Wrong version of the IDE in include file

This issue may easily be resolved by correcting the version in the file ide/version.inc. You can use File Explorer to browse to /usr/lib/lazarus/2.0.10/ide and open the file in Pluma (Debian default text editor). Change the version stated in the file, adding the missing "+b2" and, as you cannot save the file directly as simple user, save it somewhere in your home directory, for example, the Documents folder. Then open a terminal and enter the following in order copy the modified file as root to its original location:
    su
    cd Documents
    cp version.inc /usr/lib/lazarus/2.0.10/ide/version.inc
The next time, you start Lazarus, all should be ok.

Lazarus/FPC on Deepin.

The installation of Lazarus/FPC on Deepin is a one-click operation. In fact, Lazarus is available in Deepin AppStore. Open this application and search for "lazarus". Select the only search result "Lazarus: The paradise for Pascal developers" and push the Install button. That's it! And no problem encountered on my system.

Lazarus/FPC on Deepin: Installing Lazarus with Deepin App Store

Lazarus/FPC on Kali Linux.

When you launch Lazarus for the first time, it's the Configure Lazarus IDE window that shows up. In the case of my Lazarus installation on Kali Linux, I got the following error condition: There is a problem with the Fppkg configuration. To resolve this issue, push the Restore Fppkg configuration button (screenshot on the left) and in the opening Generate new Fppkg configuration files, push the Write new configuration files button (screenshot on the right). When done, the red exclamation mark next Fppkg should have disappeared, all ok now and the IDE starting up properly.

Lazarus/FPC on Kali Linux: Problem with Fppkg configuration file
Lazarus/FPC on Kali Linux: Writing new Fppkg configuration files

Note: It seems that Kali 2022.3 has issues with the installation of Lazarus, possibly similar to those, I experienced with Parrot OS.

Lazarus/FPC on Linux Lite.

Here, I used Apt to install Lazarus from the ok2cqr/lazarus repository3. Open a terminal and enter the following commands:
    sudo add-apt-repository ppa:ok2cqr/lazarus
    sudo apt update
    sudo apt install lazarus fpc
The 3 commands respectively add the repository, update the package list and install Lazarus/FPC.

When you launch Lazarus for the first time, it's the Configure Lazarus IDE window that shows up. In the case of my Lazarus installation on Linux Lite, I got the following error condition: There is a problem with the Fppkg configuration. To resolve this issue, push the Restore Fppkg configuration button (screenshot on the left) and in the opening Generate new Fppkg configuration files, push the Write new configuration files button (screenshot on the right). When done, the red exclamation mark next Fppkg should have disappeared, all ok now and the IDE starting up properly.

Lazarus/FPC on Linux Lite: Problem with Fppkg configuration file
Lazarus/FPC on Linux Lite: Writing new Fppkg configuration files

Lazarus/FPC on MX Linux.

I tried to install Lazarus the "usual" way, using AptGet (for details cf. Installing Lazarus/Free Pascal on Ubuntu). When starting Lazarus for the first time, the Configure Lazarus IDE window showed up, indicating not only that there was a wrong Lazarus version stated in ide/version.inc, but also that the FPC sources and the debugger hadn't been installed!

Lazarus/FPC on MX Linux: Incomplete installation with AptGet - FPC sources missing
Lazarus/FPC on MX Linux: Incomplete installation with AptGet - GBD (GNU debugger) missing

I decided to use the MX Package Installer to install the missing components. Maybe, that if I had used it for Lazarus, too, all dependencies would have been resolved and all Lazarus components properly installed. Maybe... The screenshot shows the results, I got, when searching for "fpc" in MX Package Installer and what packages I selected for installation. After that, I searched for "gdb", and selected the package "gdb (GNU debugger)", version 10.1-1.7 to be installed.

Lazarus/FPC on MX Linux: Installing the FPC packages using MX Package Installer

After all packages have been installed, I restarted Lazarus and got the message shown on the screenshot: There is already a configuration from version 2.0.10 in /home/{user-name}/.lazarus. This is due to the fact, that a configuration file had been created when I launched Lazarus after the (incomplete) installation with AptGet. You are asked if you want to change the configuration; push the Downgrade button to convert settings to the new configuration.

Lazarus/FPC on MX Linux: Convert existing settings to new configuration

Nearly done. The only issue remaining is the wrong version in ide/version.inc: 2.0.10+dsfg-4, with the actual version being 2.0.10+dsfg-4+b2, as you can see in the window's title bar on the screenshot.

Lazarus/FPC on MX Linux: Wrong version of the IDE in include file

This issue may easily be resolved by correcting the version in the file ide/version.inc. You can use File Explorer to browse to /usr/lib/lazarus/2.0.10/ide and open the file in Pluma (Debian default text editor). Change the version stated in the file, adding the missing "+b2". As you are actually in a directory, where only the super user has the permission to write to, you will be asked for your password before you can do so. The next time, you start Lazarus, all should be ok.

Lazarus/FPC on Parrot OS.

I tried several ways to install Lazarus 2.2.0: using the graphical Synaptic Package Manager, using AptGet, using Apt from the ok2cqr/lazarus repository: just failures, due to unmet dependencies. I posted in the Parrot forum, where I was said that there are known issues with Lazarus 2.2.0 on Parrot OS 5.0.1 (as on Kali Linux 2022.3) and that I should try Lazarus 2.0.10. I downloaded the DEB packages from Sourceforge: the FPC compiler and the sources installed without problems, but no chance for the Lazarus package: Could not download all required files error message. I actually gave it up at this stage. If I get some new answers in the forum, I'll update this document; if someone, reading this text, has any suggestions, please, let me know.

Lazarus/FPC on SemiCode OS

Using Ubuntu Software Center did not work for me: FPC sources and debugger were not installed. So, trying the "usual" way, using AptGet (for details cf. Installing Lazarus/Free Pascal on Ubuntu). This installed the (very) old version 1.0.10, that, of course will not be able to build all projects, developed with the recent Lazarus version, but, in many cases, will work, or will work after a few changes in the source code. One little problem with the broken package "leakview". Just push the OK button, when the message pops up. Except probably for projects using this package, all should work correctly.

Lazarus/FPC on semiCode OS: Broken package 'leakview'

Lazarus/FPC on Zorin OS

I used Apt to install Lazarus from the ok2cqr/lazarus repository3. Open a terminal and enter the following commands:
    sudo add-apt-repository ppa:ok2cqr/lazarus
    sudo apt update
    sudo apt install lazarus fpc
The 3 commands respectively add the repository, update the package list and install Lazarus/FPC.

Notes:
  1: If, after the installation is done, you don't find a launch shortcut for Lazarus, rebooting may be required. You can always launch the IDE from a terminal by entering lazarus-ide.
  2: I haven't installed Lazarus on Linux Mint, to be sure not to mess up my FPC cross-compiler for DOS, 16bit, installed there.
  3: If on some distribution, you get the error message that add-apt-repository does not exist, install the package software-properties-common before using it.


If you find this text helpful, please, support me and this website by signing my guestbook.