Cannot execute Lazarus IDE on Linux Mint 20.1 lazarus / 32-Linux ---------------------------------------------------------------------- maurobio · 2025-04-15 22:40 Dear ALL, I have tried to install the latest version of Lazarus (v3., 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, ---------------------------------------------------------------------- TRon · 2025-04-16 00:18 Quote from: maurobio on April 16, 2025, 12:40:15 amI 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. QuoteHow 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). QuoteDoesn'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. QuoteNotice 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. ---------------------------------------------------------------------- Dzandaa · 2025-04-16 08:53 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. 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-> ---------------------------------------------------------------------- Thaddy · 2025-04-16 09:20 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo nano /etc/apt/sources.list.d/backports.listthen add:Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverseAnd save. Finally do:Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo apt update See Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i man sources.listfor 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. ---------------------------------------------------------------------- maurobio · 2025-04-16 12:03 Dear ALL, I'm afraid I'm at a great loss here!  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, ---------------------------------------------------------------------- Dzandaa · 2025-04-16 12:57 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. 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 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-> ---------------------------------------------------------------------- maurobio · 2025-04-16 14:33 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, ---------------------------------------------------------------------- Thaddy · 2025-04-16 14:44 You should try my approach, not anything else. Now playing The Hives again: https://www.youtube.com/watch?v=Uz1Jwyxd4tE ---------------------------------------------------------------------- TRon · 2025-04-16 14:47 Quote from: Dzandaa on April 16, 2025, 02:57:06 pmDownload 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. ---------------------------------------------------------------------- TRon · 2025-04-16 15:07 Quote from: Thaddy on April 16, 2025, 04:44:08 pmYou 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. ---------------------------------------------------------------------- TRon · 2025-04-16 15:15 Quote from: maurobio on April 16, 2025, 02:03:03 pmNow, "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. ---------------------------------------------------------------------- Dzandaa · 2025-04-16 16:12 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-> ---------------------------------------------------------------------- Thaddy · 2025-04-16 16:29 @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. ---------------------------------------------------------------------- robert rozee · 2025-04-21 13:26 this keeps coming up again and again! follow the instructions here: https://forum.lazarus.freepascal.org/index.php/topic,69945.msg547823.h tml#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 · 2025-04-22 20:46 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, ---------------------------------------------------------------------- maurobio · 2025-04-25 12:00 Dear ALL, Hi, as promised here I am to report on the latest results of attempts to run Lazarus 3.8 on 64-bit Mint Linux 20.1/20.3 I can confirm that applying the simply procedure suggested by @Robert Rozee works fine! By following his enlightened advice, I gave been able to successfully run the 64-bit version of Lazarus 3.8 IDE on Linux Mint 20.1 and 20.3 after installing from the Debian packages. I also confirm that the the 32-bit version of Lazarus 3.8 IDE can be successfully installed and executed on a 32-bit Linux Mint 19.1 without the need to recompile the IDE, which suggests that the problem is related to the 64-bit version of the IDE only. Several useful lessons can be taken from this exchange (including to myself, who should have checked the forum first). Thank you very much! With warmest regards, ---------------------------------------------------------------------- dbannon · 2025-04-26 00:53 maurobio, great you have it working system and great you reported back ! But as a real nit picker, I have to point out just what you have done. First, you installed the official debs, that put a whole lot of lazarus files in the (to you) read only space under /usr.  Then, because those files would not run on your older system, you overwrote the deb provided files with, generally, new versions, as root. And it all worked, good. But if you now use apt to remove that lazarus.deb package, apt will probably see the files have changed and refuse to remove them cleanly. Its not a great idea to fiddle with apt's view of the world. You would, IMHO, have been far, far better off downloading the lazarus source, compiling it in your own file area and using it from there. Simple to remove, update, add additional versions and no root access required. The underlying problem, unfortunately, is that whoever builds those deb packages is not addressing the libc issue. I use a U20.04 VM to build release of my app, having a clean system used only for release also helps pick up surprising dependency issues too. Davo ---------------------------------------------------------------------- TRon · 2025-04-26 01:04 Quote from: maurobio on April 25, 2025, 02:00:14 pmI can confirm that applying the simply procedure suggested by @Robert Rozee works fine! By following his enlightened advice, I gave been able to successfully run the 64-bit version of Lazarus 3.8 IDE on Linux Mint 20.1 and 20.3 after installing from the Debian packages. As enlightenment that might have been and without discrediting Robert's advise it is the wrong solution. Any time you need to rebuild the IDE because f.e. of an newly installed component the IDE might refuse to do so because of the issues related to checksum errors. That is unless you run the user environment as root as well (hopefully it is clear why that should not be done). dbannon named it nitpicking in his message, I am more firm and call it stubborn. Just install in user-space to get rid of all these issues instead of meddling along. ---------------------------------------------------------------------- robert rozee · 2025-04-26 02:23 i've see mention of a "might" as well as a concerned "probably", yet in my experience i've never encountered any of the mentioned problems while hacking away at the Lazarus and FPC internals. now, i must admit that i have never installed any additional components to the IDE, simply because (a) it doesn't work, and (b) the existing collection of components is rich enough to perform everything i have ever needed. to clarify upon the 'doesn't work' part, the .deb installs (under Linux) install Lazarus and FPC in such a way that adding a component to the IDE 100% fails; the IDE lacks the necessary internal mechanisms (temporarily elevated privileges) to handle rebuilding itself in the default install location. can someone please confirm that using sudo make bigide actually (1) inhibits using apt to remove the installation, or, (2) creates a checksum error failure? the issue of (3) installing components to the IDE, is not something that can commented on as this is not currently supported with a .deb install. at the moment i'm not able to do any testing here, but will try to this evening. cheers, rob   :-) ---------------------------------------------------------------------- TRon · 2025-04-26 02:51 Quote from: robert rozee on April 26, 2025, 04:23:48 ami've see mention of a "might" as well as a concerned "probably", yet in my experience i've never encountered any of the mentioned problems while hacking away at the Lazarus and FPC internals. now, i must admit that i have never installed any additional components to the IDE, simply because (a) it doesn't work, and (b) the existing collection of components is rich enough to perform everything i have ever needed. to clarify upon the 'doesn't work' part, the .deb installs (under Linux) install Lazarus and FPC in such a way that adding a component to the IDE 100% fails; the IDE lacks the necessary internal mechanisms (temporarily elevated privileges) to handle rebuilding itself in the default install location. I am highly confused by that paragraph for several reasons. It is normal for end-users to install components into the IDE using the accompanied (but not yet installed components), using OPM (Online Package Manager) to install 3th party components (to keep it simple those come from the interwebs) and lastly doing a manual package installation. When the IDE is installed in a 'protected' directory it obviously will fail to (re)build at that same location. Therefor the IDE has a mechanism in place that uses the Lazarus configuration directory to 'install' the rebuild IDE. To my understanding the startlazarus command will notice this and run the correct Lazarus version for the user. In that mechanism of building and putting things in the right location, some things currently go wrong (they are known bugs, some already fixed some are planned to be fixed), and on top of that sometime thing go wrong with the checksum checking which then triggers the need for a rebuild of a unit (which then is able to run into the same fore mentioned issue) Quotecan someone please confirm that using sudo make bigide actually (1) inhibits using apt to remove the installation, or, (2) creates a checksum error failure? Would love to but there is no way in h*ll I am going to do so on my development system. It took me too much sweat and tears to get things as they are (and is rock solid for a decade (might be more) now). So, I would have to wait for my big-rig to be alive again so that I can properly test that in a vm though I have no reason to doubt it will behave as mentioned. Quotethe issue of (3) installing components to the IDE, is not something that can commented on as this is not currently supported with a .deb install. given my previous remarks ^^ that ^^ confuses me. Installing components has absolutely nothing to do with .deb packages. Quite honestly even if it did then I wouldn't touch those .deb packages in a million years as they will mess up an existing setup as it is impossible to do that right. Note that .debs aren't even capable of correctly supporting multiple installations. Thus in the end that gives us a couple of approaches and the ones that include running as admin, owning the directory (though installing in user-space could be considered as such) and keep on using the .deb files or some other custom form of installation which are all not the solution to the issue. SImplest and as mentioned before: FPCUpDeluxe, or build from source. For both ways: install in user space. edit: typo's ---------------------------------------------------------------------- dbannon · 2025-04-26 04:30 Look folks, lets be clear here. No one is having a go at someone else, we all have techniques we use, sometimes 'informal' ones, and some of them might come at a cost. So, some observations I suspect most users, including ones who install from a deb (or rpm, pacman) also install packages. And it works for almost all of them. If it does not work, the reason needs to be established and, probably, fixed. In this case, maurobio problem was not caused by package install, it was in fact, just another case of the dreaded libc problem. He is using a quite old (but still supported ?) version of Mint. Its a well know fact that binaries made in recent versions of linux will not run in old versions of linux. Rob's advice of rebuilding the binaries worked because it replaced the binaries with ones build on his, older system. It had to be done as root because the apt installs into root space. Lazarus, because it expects to sometimes be installed in read only space, has a pretty cool but I assume quite complicated process of doing its rebuilding in user space and hiding that from the user, fortunately, only if its running from user space. Same thing if you, eg, add some debug lines to an LCL unit ??  That we all agree on ? My speculation - If Rob is unable to rebuild Lazarus, then that complicated process of using eg ~/.lazarus to store all the new files is somehow perturbed. My guess is who ever designed that process did not expect to contend with a rebuild. But that is pure speculation. But it does not worry him, great, lets leave it like that. If Rob or maurobio do need to rebuild lazarus before using, then, perhaps, doing that rebuild from a clean, freshly downloaded source in user space will be no harder and quite possibly deliver a better produce. Better in that (a) its not using the redirect rebuilt files process (complicated, possibly slower and fragile). (b) more flexible, you can have as many different lazarus installs as you like. (c) you are not messing with the apt database. (d) its easy to understand exactly where the lazarus and LCL fies you are using are, important if you are poking around in there, debugging or what ever. (e) its easy to blow any one lazarus install without affecting anything else. Just my thoughts. Simpler is almost always better. Davo ---------------------------------------------------------------------- dbannon · 2025-04-26 06:06 Here you go Rob, on a VM, I installed fpc, fpc-src and lazarus 3.8.0. Then rebuilt lazarus in the readonly space, started lazarus up as me, installed a package (which worked fine incidently) and exited. Removed Lazarus (sudo apt remove lazarus-project). Important, this was done on a U2404VM, so no problems with the libc issue. But, as noted, thats a known issue, expected on a Linux Mint as old as discussed (or, eg U2004, still a supported distro). Observed, on the run where lazarus was rebuilt as root, the remove process was incomplete, not as bad as I expected but incomplete. On the run without a root rebuild, there was nothing left in root space. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i dbannon@u2404m:~/Downloads$ sudo -iroot@u2404m:~# cd /usr/share/lazarus/3.8.0 root@u2404m:/usr/share/lazarus/3.8.0# make bigide > /tmp/lazarus.logroot@u2404m:/usr/share/lazarus/3.8.0# root@u2404m:/usr/share/lazarus/3.8.0# logout # here, started lazarus in another terminal, successfully installed a package# kcontrols and exited. dbannon@u2404m:~/Downloads$ du -hs ../.lazarus/307M    ../.lazarus/dbannon@u2404m:~/Downloads$ sudo apt remove lazarus- project...dbannon@u2404m:~/Downloads$ du -hs /usr/share/lazarus/6.0M  /usr/share/lazarus/ # OK, same but without the sudo make bigide step# removed, as root, the residual files left in /usr/share/lazarus/3.8.0# installed the lazarus deb package# Opened Lazarus, installed kcontrols, exited. dbannon@u2404m:~/Downloads$ sudo apt remove lazarus-project...dbannon@u2404m:~/Downloads$ dbannon@u2404m:~/Downloads$ dbannon@u2404m:~/Downloads$ du -hs /usr/share/lazarus/du: cannot access '/usr/share/lazarus/': No such file or directory In summary, its most certainly not a disaster, but its also not good. Maybe related, history certainly tells us an incomplete removal of Lazarus can disrupt further installs. I suspect thats not as big of a problem now as it was once. But still a worry, best avoided. And, note I had no problems installing a package in either run. The problem you have with packages must have a deeper cause. As long as you don't need any packages, who cares ?  If you do need a package, take my advice, download a source zip, build it in user space, I bet its works as expected. Certainly no harder than what you do now. Davo ---------------------------------------------------------------------- robert rozee · 2025-04-29 11:40 well, i may need to eat some humble pie  it has been a few years since i last even tried to add a component/etc to the IDE (and failed). but today i just revisited it... and succeeded! thinking back, it could well have been that back then i was running a much earlier version of Lazarus (addendum: 2.2.4?), and in particular that i had deleted startlazarus from the /usr/bin directory and replaced it with a symlink to /usr/bin/lazarus-ide. this was something recommended on the forum to get around a bug (in startlazarus) that occasionally caused the wrong .lpi file to be used from the previously opened project instead of the current project. just had a quick search through the forum, but couldn't find the original reference to this. have used Tools -> Build Lazarus with... and it does now indeed create a .lazarus directory in the current user's home directory into which is placed all the 'expected stuff'. personally, i'm still perfectly happy with the existing locations as i don't need to add components to the IDE or add packages - i write everything i need myself. however, i do see that Run -> Clean up and Build... does not work - although this issue is unrelated to the original poster's problem. cheers, rob   :-) ---------------------------------------------------------------------- dbannon · 2025-04-29 11:55 Yep, that would do it. Startlazarus is key to that slight of hand magic. I personally don't use it, I go straight to 'lazarus' because I always build my lazarus from source and I really wonder just what that startlazarus does ... The clean up and build  is actually important, I always use that, for example when building with a different version compiler. And, sometimes unexplainable errors go away after a "cleanup and build".  And yep, I can confirm your report, its fails on freetype. I'll have a dig when I get time and, perhaps a bug report is in order. Sigh ... Davo