How to Install Lazarus IDE in Ubuntu 20.04, 18.04, 22.04

Last updated: October 9, 2023

This is a step by step guide shows how to install the Lazarus IDE in Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04 and their derivatives, e.g., Linux Mint, Elementary OS and more.

Lazarus is a free Delphi compatible cross-platform IDE for rapid application development using the Free Pascal compiler. User may install the project either from Ubuntu repository or by using the official DEB packages.

Lazarus IDE in Ubuntu

Option 1: Install Lazarus via Ubuntu repository:

Ubuntu includes Lazarus in its own repositories, but it does not provide updates for the package. So the package will always be old, though Ubuntu 21.10 has v2.0.12, most recent release at the moment.

The good side is that user may install the package on 64-bit modern PC, old 32-bit PC on Ubuntu 18.04, and/or arm64/armhf devices (e.g., Apple silicon and Raspberry Pi).

To install the package, press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the command below and hit Enter:

sudo apt install lazarus

This command will install Lazarus, fpc compiler, as well as all other required packages:

Once installed, search for and open the IDE from activities overview and enjoy!

Option 2: Install Lazarus via its official DEB packages:

The IDE provides official Linux packages available to download at the sourceforge.net. You can always get the latest version from the link button below, though it’s only provides packages for modern 64-bit and old 32-bit PC.

The official deb packages are made up of:

  • fpc-laz – the Compiler, some command line tools, base units and non visual components like database access
  • fpc-src – the sources of fpc and its packages, needed for code browsing
  • lazarus-project – the IDE, visual components and help files

Grab all the 3 packages. Then, open file manager and go to ‘Downloads‘ folder, right-click and choose ‘Open in Terminal‘ to open terminal with that folder as working directory. Finally, run command to install them:

sudo apt install ./fpc*.deb ./lazarus-project*.deb

NOTE: the official package conflicts with the one in Ubuntu own repository. Though the IDE supports for having multiple package versions in same system, installing Lazarus via either way in this tutorial will remove another (if any) automatically.

And it will prompt to either upgrade or downgrade configuration when switching between different app versions on first startup.

Uninstall Lazarus:

To remove the Lazarus IDE, run command below in terminal will do the trick for the software installed via both methods.

sudo apt remove --autoremove lazarus lazarus-project fpc-*

That’s all. Enjoy!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

3 responses to How to Install Lazarus IDE in Ubuntu 20.04, 18.04, 22.04

  1. Hi Ji m,

    Uninstall and install with the 2.Option works on my Ubuntu 20.04

    Thank you so much!

    Rolf

  2. My favourite Ubuntu IDE is Codelobster – https://www.codelobster.com

  3. I’ve been using Lazarus on Windows for years. Thank you for helping me see how to install and run Lazarus in Ubuntu. I took the command line option and it is working just great!