Recent

Author Topic: Cannot execute Lazarus IDE on Linux Mint 20.1  (Read 1372 times)

maurobio

  • Hero Member
  • *****
  • Posts: 640
  • Ecology is everything.
    • GitHub
Cannot execute Lazarus IDE on Linux Mint 20.1
« on: April 16, 2025, 12:40:15 am »
Dear ALL,

I have tried to install the latest version of Lazarus (v3.8), along with FPC, on a machine running Linux Mint 20.1 "Ulyssa".

I installed directly from the debs and everything seems to be OK and the Free Pascal compiler works fine, but when I attempt to run the IDE from the terminal using the "starlazarus" command, I receive the message: "startlazarus: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by startlazarus)". I then attempted to update the libc6 using the commands "sudo apt update" and "sudo apt install libc6", but then I get the message "libc6 is already the most recent version (2.31-0ubuntu9.17)".

How to solve this? Doesn't the most recent version of Lazarue ran in older versions of Linux? Notice that Linux Mint 20.1 is near end-of-life, but it has still not reached it.

Thanks for any assistance you can provide.

With warmest regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 3.8 - FPC 3.2.2 on GNU/Linux Mint 19.1/20.3, Windows XP SP3, Windows 7 Professional, Windows 10 Home

TRon

  • Hero Member
  • *****
  • Posts: 4324
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #1 on: April 16, 2025, 02:18:34 am »
I installed directly from the debs and everything seems to be OK and the Free Pascal compiler works fine, but when I attempt to run the IDE from the terminal using the "starlazarus" command, I receive the message: "startlazarus: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by startlazarus)".
Congratulations and welcome in the world of Linux source-compatibility (e.g. not windows binary compatibility).

It is a known issue in both the Linux and FPC community.

Quote
How to solve this?
Solution 1:
- in case your distribution comes with a package-manager that has FPC 3.2.2 listed, then use your package manager to install FPC 3.2.2
- after having installed the FPC compiler build Lazarus from source (instructions available in wiki, it is a 3-liner).

Solution 2:
- Use FPCUpDeluxe

There are more solutions possible but these are the two easiest ones and which takes the least amount of time.

Whatever you do when using a distribution that is near eol: never use the latest and greatest installer, deb packages or whatever magic installation method/script/suggestions. If it is in your capabilities then build both compiler and Lazarus IDE from source. In case that is not possible use the best next thing which would be FPCUpDeluxe.

Before doing so, remove all remnants of previous installed FPC compilers and Lazarus IDE's and install both the FPC compiler and Lazarus IDE in user space (whether build manual or with FPCUpDeluxe).

Quote
Doesn't the most recent version of Lazarue ran in older versions of Linux?
Nope. The build-server uses a newer libc than is supported by your distribution.

Quote
Notice that Linux Mint 20.1 is near end-of-life, but it has still not reached it.
There is no relevance with your distribution being almost eol. I exaggerate here to get the point across but, it is in similar nature as wondering about why the executable of the latest windows 11 release of your favourite application does not run on MSDos or a PS5 game not on a PS2.
Today is tomorrow's yesterday.

Dzandaa

  • Sr. Member
  • ****
  • Posts: 423
  • From C# to Lazarus
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #2 on: April 16, 2025, 10:53:15 am »
Hi,

I use installation from Lazarus web site (3.4 FPC 3.2.2 and 3.6 FPC 3.2.2) without problem on Linux Mint 20.1 64 Bits Cinnamon.
I also have Linux Mint 22 with same configuration and a 22.1 with the latest stable (3.8) version.

I never use the package manager.

https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/


I run Lazarus from the menu->Programming.


B->
Regards,
Dzandaa

Thaddy

  • Hero Member
  • *****
  • Posts: 16813
  • Ceterum censeo Trump esse delendam
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #3 on: April 16, 2025, 11:20:22 am »
I believe mint is debian or ubuntu (also debian based) based?
In that case add backports to apt.
It may be that it then can update glibc to a newer version.
That is, if mint does not add backports by default, like ubuntu does.
(which is, in my opinion, the best option for non-professional projects)

Modify /etc/apt/sources.list to do that.
Google for exact instructions per mint version.
should be something like:
Code: Bash  [Select][+][-]
  1. sudo nano /etc/apt/sources.list.d/backports.list
then add:
Code: Bash  [Select][+][-]
  1. deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
And save.
Finally do:
Code: Bash  [Select][+][-]
  1. sudo apt update

See
Code: Bash  [Select][+][-]
  1. man sources.list
for how to do that, because recently it has changed a bit and I am not otherwise familiar with mint (frankly, I hate it).
Hope that helps.
« Last Edit: April 16, 2025, 01:51:16 pm by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

maurobio

  • Hero Member
  • *****
  • Posts: 640
  • Ecology is everything.
    • GitHub
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #4 on: April 16, 2025, 02:03:03 pm »
Dear ALL,

I'm afraid I'm at a great loss here!  :o

To clarify things a little bit, here is what I have done from the start:

I downloaded the 64-bit Debian packages from the official Lazarus repository at SourceForge.

I then installed the packages by issuing the commands "sudo apt install ./fpc-laz_3.2.2-210709_amd64.deb,  ./fpc-src_3.2.2-210709_amd64.deb,  ./lazarus-project_3.8.0-0_amd64.deb"

The installation proceeded without errors and the Free Pascal compiler ran fine from a terminal window.

An icon launcher for Lazarus has been created - but when I click on it, nothing happened; I then opened a terminal window and typed the command "startlazarus" and then I got the dreaded message: "startlazarus: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by startlazarus)".

Now, "FPCUpDeluxe"? "Compiling Lazarus from the sources"? "Modify apt sources"? Why should all this be necessary? Aren't the Debian packages supposed to work out-of-the-shelf??? It did in previous versions of Lazarus and should work in newer versions too as member @Dzandaa reports success in his installation of the IDE.

Best regards,

UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 3.8 - FPC 3.2.2 on GNU/Linux Mint 19.1/20.3, Windows XP SP3, Windows 7 Professional, Windows 10 Home

Dzandaa

  • Sr. Member
  • ****
  • Posts: 423
  • From C# to Lazarus
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #5 on: April 16, 2025, 02:57:06 pm »
Hi
@murobio:

Are you sure that there is nothing left of the installation from the Mint repository?

Don't use the Lazarus version on Mint repository, it is not the latest.

I advise you to start from scratch:

Uninstall it  with the "Software manager"

or better

Uninstall it completely with "Synaptic Package Manager"

Search for "fpc", look what is installed (Green square), select  it with Right Click and  "Mark for Removal" then "Apply"
Do the same with "lazarus"

Download the 3 packages from Sourceforge

Install them in this order:

fpc-laz, fpc-src, lazarus project

by just clicking on each .deb files (that launch the "Archive Manager") then Install.

I didn't test the latest version of Lazarus (3.8) with Linux Mint Linux Mint 20, so try first an older version like 3.4 or 3.6.

I also just use the 64 bits versions of Lazarus.

After the first run, I install "anchordockingdsgn" from "Package->Install/Uninstall Packages" to have a pleasant environment.

For Graphic, I use "BGRABitmap" and "BGRAControls" from "Package->Online Package Manager"

Some tricks for linux:

Enable access to USB:
sudo usermod -a -G dialout <user>

Open GL: cannot find -lGL (for BGRABitmap)
sudo apt install libgl1-mesa-dev

SQLite:
sudo apt install sqlite3
sudo apt install libsqlite3-dev

Slow:
sudo apt install appmenu-gtk2-module
sudo apt-get install libgtk2.0-dev

Missing dependencies:
apt-get install -f

Missing Debugger:
apt-get install gdb

Ask if you have problems.

B->

« Last Edit: April 25, 2025, 12:03:22 pm by Dzandaa »
Regards,
Dzandaa

maurobio

  • Hero Member
  • *****
  • Posts: 640
  • Ecology is everything.
    • GitHub
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #6 on: April 16, 2025, 04:33:03 pm »
Hi, @Dzaandas!

I never installed Lazarus from the Mint repository. In my previous posting, I reported the exact steps I executed - I installed from the Debian packages available from the official Lazarus repository at SouceForge.

Best regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 3.8 - FPC 3.2.2 on GNU/Linux Mint 19.1/20.3, Windows XP SP3, Windows 7 Professional, Windows 10 Home

Thaddy

  • Hero Member
  • *****
  • Posts: 16813
  • Ceterum censeo Trump esse delendam
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #7 on: April 16, 2025, 04:44:08 pm »
You should try my approach, not anything else.
Now playing The Hives again:
https://www.youtube.com/watch?v=Uz1Jwyxd4tE
« Last Edit: April 16, 2025, 04:46:28 pm by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

TRon

  • Hero Member
  • *****
  • Posts: 4324
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #8 on: April 16, 2025, 04:47:17 pm »
Download the 3 packages from Sourceforge

Install them in this order:

fpc-laz, fpc-src, lazarus project
By now you should know that is exactly the wrong advise. Never seen you pick up the pieces when using that advise goes south though.
Today is tomorrow's yesterday.

TRon

  • Hero Member
  • *****
  • Posts: 4324
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #9 on: April 16, 2025, 05:07:00 pm »
You should try my approach, not anything else.
Using back ports might bring him a more up to date version but is not going to solve other issues and/or make the upgrade part and/or multiple installations any easier.
Today is tomorrow's yesterday.

TRon

  • Hero Member
  • *****
  • Posts: 4324
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #10 on: April 16, 2025, 05:15:06 pm »
Now, "FPCUpDeluxe"? "Compiling Lazarus from the sources"? "Modify apt sources"? Why should all this be necessary? Aren't the Debian packages supposed to work out-of-the-shelf??? It did in previous versions of Lazarus and should work in newer versions too as member @Dzandaa reports success in his installation of the IDE.
This issue has been discussed to death. Search for the libc error here in the forums but also do one on the generic interwebs. No reason to repeat the same discussion and arguments again. Instead invest that time in understanding how things (don't) work and what to do about it. And please let the phrase 'source-compatibility not binary compatibility' sink in for a moment) because that allows to answer the why question.
Today is tomorrow's yesterday.

Dzandaa

  • Sr. Member
  • ****
  • Posts: 423
  • From C# to Lazarus
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #11 on: April 16, 2025, 06:12:40 pm »
Hi,

@maurobio:

I did some test on a Linux Mint 20.3

3.8 -> not working (same error GLIBC_2.34)
3.6 -> not working (same error GLIBC_2.34)
3.4 -> working

If you look at version of Glibc for Linux Mint 20.xxx:
ldd -- version

glibc is 2.31

Sorry, but linux mint 20.xx is at the end of life (in 45 days) and I think that the only solution (like I did) is to migrate to the new version 22.1.

B->


Regards,
Dzandaa

Thaddy

  • Hero Member
  • *****
  • Posts: 16813
  • Ceterum censeo Trump esse delendam
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #12 on: April 16, 2025, 06:29:28 pm »
@Dzandaa
Nonsense
Yes it is end of life but adding backports, note: exactly like I prescribed,
renders the correct install.

Tried in a vm.

But you are right that he should upgrade his very old installation.

Anyway, that particular vm is gone after this discussion closes.
« Last Edit: April 16, 2025, 06:32:05 pm by Thaddy »
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

robert rozee

  • Sr. Member
  • ****
  • Posts: 268
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #13 on: April 21, 2025, 03:26:10 pm »
this keeps coming up again and again!

follow the instructions here:
https://forum.lazarus.freepascal.org/index.php/topic,69945.msg547823.html#msg547823

open a terminal window and type in:

user@Mint19:~$ cd /usr/share/lazarus/3.8.0
user@Mint19:/usr/share/lazarus/3.8.0$ sudo make bigide


much text will scroll up the terminal window, and after a minute or so the Lazarus IDE will have been rebuilt and be able to run.

now find an indelible marker and write the two lines above across the foreheads of anyone who tries to have you follow any other instructions   >:(


cheers,
rob   :-)

maurobio

  • Hero Member
  • *****
  • Posts: 640
  • Ecology is everything.
    • GitHub
Re: Cannot execute Lazarus IDE on Linux Mint 20.1
« Reply #14 on: April 22, 2025, 10:46:07 pm »
Hi, Robert Rozee!

Thank you very much for your suggestion.

In fact, so far I have been successful only with the suggestion by member @Dzandaa, that is, downgrading my Lazarus installation to version 3.4 on Linux Mint 20.3 - it worked like a charm.

I will try your suggestion to get version 3.8 up and running on that same version of Mint and I will report the results soon,

With warmest regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 3.8 - FPC 3.2.2 on GNU/Linux Mint 19.1/20.3, Windows XP SP3, Windows 7 Professional, Windows 10 Home

 

TinyPortal © 2005-2018