Recent

Author Topic: Installing Lazarus on Linux Mint  (Read 11769 times)

scasparz

  • Jr. Member
  • **
  • Posts: 55
Installing Lazarus on Linux Mint
« on: May 07, 2019, 12:40:45 am »
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   
  • fpc-src_3.0.4-1_i386.deb
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:
Code: Text  [Select][+][-]
  1. cd ~/Downloads

On there you may list the three .deb packages with ls command
Code: Text  [Select][+][-]
  1. ls -laF *.deb
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:
Code: Text  [Select][+][-]
  1. sudo dpkg -i fpc-laz_3.0.4-1_i386.deb
  2. sudo dpkg -i fpc-src_3.0.4-2_amd64.deb, and
  3. 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:
Code: Text  [Select][+][-]
  1. apt-get install -f

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:
Code: Text  [Select][+][-]
  1. apt-get install gdb
Now reopen Lazarus.

That’s all folks. Happy coding. ;D



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.
« Last Edit: May 07, 2019, 12:51:42 am by scasparz »

Carver413

  • Full Member
  • ***
  • Posts: 119
Re: Installing Lazarus on Linux Mint
« Reply #1 on: May 07, 2019, 01:15:37 am »
fpcupdeluxe is by far the easiest way to install Lazarus

VTwin

  • Hero Member
  • *****
  • Posts: 1215
  • Former Turbo Pascal 3 user
Re: Installing Lazarus on Linux Mint
« Reply #2 on: May 07, 2019, 01:50:41 am »
Pretty much what I do on Ubuntu. You may need:

sudo apt-get install libgtk2.0-dev

“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 12.1: Lazarus 2.2.6 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 2.2.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.2.6 (64 bit on VBox)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Installing Lazarus on Linux Mint
« Reply #3 on: May 07, 2019, 02:15:40 am »
I find easier to create a local personal repository and use the higher level tools; but each to its own, I guess :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

kinnon_2000

  • New Member
  • *
  • Posts: 22
Re: Installing Lazarus on Linux Mint
« Reply #4 on: September 03, 2021, 05:26:39 pm »
Thanks for sharing this!

Although its an old post, I used the steps outlined to install Lazarus 2.2RC1 onto Linux Mint Cinnamon 20.2 and it worked perfectly, thank you.

I would love to find a similar guide on uninstalling and upgrading.

I ruined my Linux install recently trying to switch from Lazarus 2.0.2.1 to 2.2RC1 which doesn't have DockedFormEditor.


fmarulaz

  • Newbie
  • Posts: 1
Re: Installing Lazarus on Linux Mint
« Reply #5 on: May 29, 2023, 09:35:00 am »
Hello,

Thanx for you method !

Have a nice day

 

TinyPortal © 2005-2018