There is a simple and easy way to install Lazarus on Mint. That is any Mint: Cinnamon, Mate, XFCE, 32 or 64 bit. Just follow these steps:
1. Forget synaptic or whatever GUI tool you use for the purpose, the Lazarus version provided by the distro may not be the latest and of course the greatest.
2. Instead download the latest stable Lazarus .deb packages from sourceforge.
For this, use your internet browser to visit
https://www.lazarus-ide.org/index.php?page=downloads page. From there you should select either the 32-bit .deb package or the 64-bit as appropriate. You will be taken to a SourceForge page, from where you should download the three packages, the names of which may differ slightly by the time you read this, depending upon the version and platform:
- lazarus-project_2.0.2-0_i386.deb
- fpc-laz_3.0.4-1_i386.deb
and finally
or alternatively lazarus-project_2.0.2-0_amd64.deb
etc in case you opt for the 64-bit version.
By the time you finish this you will end with these three .deb packages downloaded at the ~/Downloads directory.
Open a terminal session -we are Linux, and we are developers,
we are not afraid of the command prompt-, and get to the ~/Downloads directory with:
On there you may list the three .deb packages with ls command
This is what you will be getting:
-rw-rw-r-- 1 yourusername yourusername 23753598 Feb 6 00:04 fpc-laz_3.0.4-1_amd64.deb
-rw-rw-r-- 1 yourusername yourusername 23668348 Feb 6 00:04 fpc-src_3.0.4-2_amd64.deb
-rw-rw-r-- 1 yourusername yourusername 98224176 Feb 6 00:04 lazarus-project_2.0.2-0_amd64.deb
4. Now install one by one the three downloaded packages in this order using the Linux commands:
sudo dpkg -i fpc-laz_3.0.4-1_i386.deb
sudo dpkg -i fpc-src_3.0.4-2_amd64.deb, and
sudo dpkg -i lazarus-project_2.0.2-0_i386.deb
You will be asked to provide your user password. This will temporarily escalate your privileges to the root level, required to perform a package installation.
Be very careful in what you type,
remember this is the command prompt. To ease yourselves from the version cluttering you may benefit from the copy-paste capabilities provided by the Linux terminal. Use your mouse and select the full names of the .deb packages to install as displayed by the previous
ls command. Then paste them after the
sudo dpkg -i command prefix.
The last command (sudo dpkg -i lazarus-project_2.0.2-0_i386.deb) will leave a number of unsatisfied dependencies. This is pretty normal on Mint. To complete installation and install those missing dependencies, type the Linux command:
This will download and install the plethora of the unsatisfied dependencies automatically.
5. Start Lazarus from the Start - Development - Lazarus menu entry.
Much like under windows, the first time you run a Lazarus instance you will be provided with a similar window that will report any errors left. On Mint 19.1 - 64 XFCE that I use, no errors are found.
In the past, with some Mint versions Lazarus could not locate -and use- the gdb, that is the GNU Debugger and this
was clearly marked on this intro window. If gdb in not installed, close the intro window and have gdb installed again from the terminal with the Linux command:
Now reopen Lazarus.
That’s all folks. Happy coding.
PS. To the extend that I know, this way will work on any Debian fork and not only Mint, eg Linux MX. Given Mint is an Ubuntu fork, would expect it to work under Ubuntu as well.