Install FPC and Lazarus on Linux with fpcupdeluxe
Lazarus is a cross-platform IDE compatible with Delphi. It includes visual form designers and a large component library for building GUI applications. fpcupdeluxe is a graphical installer and updater for Free Pascal Compiler (FPC) and Lazarus. It can also set up cross-compilers.
This walkthrough is based on my Debian Sid setup. Package names and the installer interface can change, so check the current fpcupdeluxe README and release assets if a step no longer matches your system.
Install the build dependencies
fpcupdeluxe builds FPC and Lazarus from source. On Debian or Ubuntu, use the upstream README’s package example with git included from its prerequisite list:
sudo apt install make binutils build-essential git gdb subversion zip unzip \
libx11-dev libgtk2.0-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev
gdb is needed to debug your Lazarus programs, but not to build FPC or Lazarus. The project also provides Linux install scripts. Package names and availability depend on the distribution.
Choose a Lazarus widgetset
The command above includes GTK 2 development libraries. If you want to build or run Lazarus applications with Qt, install the corresponding QtPas library as well. On Debian-based systems, the packages have commonly been named libqt5pas-dev and libqt5pas1; Fedora has used qt5pas-devel and qt5pas. Confirm the package names for your release.
For Qt 6, see the libQt6Pas releases and install the development and runtime packages appropriate for your system. A -dev package is needed when compiling; the runtime package is needed on machines that run the application.
Current fpcupdeluxe Linux release assets identify the toolkit used by the installer GUI in the filename, with builds such as GTK 2, GTK 3, Qt 5, and Qt 6. This suffix does not decide which widgetset your own Lazarus applications should use. Choose an asset that matches your architecture and the libraries available on your desktop.
Download and start fpcupdeluxe
Open the fpcupdeluxe releases page and download the latest Linux asset for your CPU architecture and toolkit. For example, an x86-64 Qt 5 build has a name similar to fpcupdeluxe-x86_64-linux-qt5.
Make the downloaded file executable, then run it:
chmod +x fpcupdeluxe-x86_64-linux-qt5
./fpcupdeluxe-x86_64-linux-qt5
Use the actual filename you downloaded. If the window does not appear, launch the program from a terminal and inspect its error output.
Install FPC and Lazarus
In the main window, choose the FPC and Lazarus versions. Use Stable for regular work; choose Trunk when you specifically need the latest development changes and are prepared for breakage. Choose an installation directory under your home directory to avoid unnecessary permission problems.
Click Install/update FPC+Lazarus and follow the log as the installer downloads, builds, and installs the selected versions. fpcupdeluxe can keep this installation separate from other FPC/Lazarus copies, with its own Lazarus configuration directory.
If the build fails while compiling the GUI, check that the development packages for the selected widgetset are installed. Start Lazarus from the desktop shortcut created by fpcupdeluxe so it uses the configuration for this installation.
Add a cross-compiler
Open the Cross tab, select the target CPU and operating system, then click Install compiler. The required tools and libraries depend on the target, and not every target is available in every environment. Check the log if installation fails.
Once installed, select the target compiler in Lazarus before building your project. If you remove the generated shortcut, use fpcupdeluxe’s Create shortcut button to recreate one that points to the right installation.
Optional Lazarus modules
The Modules section offers items such as OPM (Online Package Manager) and Dock. OPM installs Lazarus packages from within the IDE; Dock combines the IDE’s separate windows into a docked interface.
I prefer installing packages through OPM because module packages offered by fpcupdeluxe may lag behind. Check the package’s compatibility before installing it.
For a related Linux linker setting, see how to set a shared-library search path in a Lazarus project.