The problem with installing lazarus 2.2.6 in Ubuntu 22.04 lazarus / 1-Linux ---------------------------------------------------------------------- Basenji · 2023-07-03 16:00 Hello everybody! I tried to install lazarus latest version in Ubuntu 22.04 using the command: 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 install lazarus But he writes that lazarus cannot be installed, because you need to install it first fpc. OK, I'm installing fpc. But I get the following warning about the inability to install: 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 Some packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation: The following packages have unmet dependencies: libgtk2.0-dev : Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or                          libgdk- pixbuf2.0-dev (>= 2.21.0) but it is not installable                 Recommends: debhelper but it is not installable libpango1.0-dev : Depends: gir1.2-pango-1.0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpango-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangocairo-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangoft2-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangoxft-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: pango1.0-tools (= 1.50.6+ds-2)E: Unable to correct problems, you have held broken packages. Okay, I'll install this library. But again the same thing: 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 The following packages have unmet dependencies: libgtk2.0-dev : Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or                        libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not installable                 Recommends: debhelper but it is not installable libpango1.0-dev : Depends: gir1.2-pango-1.0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                 Depends: libpango-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangocairo-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                 Depends: libpangoft2-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangoxft-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                 Depends: pango1.0-tools (= 1.50.6+ds-2)E: Unable to correct problems, you have held broken packages. ---------------------------------------------------------------------- VTwin · 2023-07-03 20:19 Did you download the files and follow the instructions here? https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64 %20DEB/Lazarus%202.2.6/ I also install libgtk2.0-dev, I have run into a few snags, but generally without problems. Something like this: Code: Pascal  [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- get install libgtk2.0-devsudo dpkg -i *.deb ---------------------------------------------------------------------- VTwin · 2023-07-03 20:39 Code: Pascal  [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- get -f install has helped me fix broken dependencies. Note that I am on Ubuntu 18.04.3 ---------------------------------------------------------------------- Basenji · 2023-07-03 21:11 Quote from: VTwin on July 03, 2023, 10:19:26 pmDid you download the files and follow the instructions here? https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64 %20DEB/Lazarus%202.2.6/ I also install libgtk2.0-dev, I have run into a few snags, but generally without problems. Something like this: Code: Pascal  [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- get install libgtk2.0-devsudo dpkg -i *.deb Yes, I followed the instructions carefully step by step. But the problem lies in 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-get install libgtk2.0-dev because this is the message: 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 Some packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation: The following packages have unmet dependencies: libgtk2.0-dev : Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or                          libgdk- pixbuf2.0-dev (>= 2.21.0) but it is not installable                 Recommends: debhelper but it is not installable libpango1.0-dev : Depends: gir1.2-pango-1.0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpango-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangocairo-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangoft2-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: libpangoxft-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed                   Depends: pango1.0-tools (= 1.50.6+ds-2)E: Unable to correct problems, you have held broken packages. ---------------------------------------------------------------------- Basenji · 2023-07-03 21:13 Quote from: VTwin on July 03, 2023, 10:39:03 pmCode: Pascal  [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- get -f install has helped me fix broken dependencies. Note that I am on Ubuntu 18.04.3 Tried this command 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- get -f installbut the reaction is 0. Maybe you did everything because you have Ubuntu 18.04.3 and I have Ubuntu 22.04? ---------------------------------------------------------------------- VTwin · 2023-07-03 21:36 Searching in the forum, I doubt it is a problem of 18 versus 22. When I get the chance though, I'll try installing on 22. Maybe someone else will chime in first though. ---------------------------------------------------------------------- TRon · 2023-07-03 22:48 just to make sure, before installing libgtk2.0-dev did you ran: $ sudo apt-get update $ sudo apt-get upgrade ? if you have issue with installing libgtk2.0-dev then I doubt there is anything we can do here as that seem to be an issue of your distribution (unless you messed up yourself, though I would have no idea how you would be able to get into this situation. The pixbuf thing is a complicated one though as there are many versions and they can't be installed all at the same time). ---------------------------------------------------------------------- Basenji · 2023-07-04 00:16 Quote from: TRon on July 04, 2023, 12:48:27 amjust to make sure, before installing libgtk2.0-dev did you ran: $ sudo apt-get update $ sudo apt-get upgrade ? if you have issue with installing libgtk2.0-dev then I doubt there is anything we can do here as that seem to be an issue of your distribution (unless you messed up yourself, though I would have no idea how you would be able to get into this situation. The pixbuf thing is a complicated one though as there are many versions and they can't be installed all at the same time). Yes, exactly as you suggested. Why would I screw up in Ubuntu?)) Yes, the distribution itself is most likely to blame. I have a suspicion that gtk2 needs to be installed. But I personally have no idea how to do it at all. P.S. Okay, I'll put this Lazarus aside for a while, since I'm not destined to learn this interesting Lazarus because of its language. ---------------------------------------------------------------------- dbannon · 2023-07-04 00:52 Basenji, looks to me like the Unbuntu repo is the problem. Ubuntu, when they make a distro, just take most things from a snapshot of Debian Testing. And Testing being what it is, sometimes it has problems. Ubuntu certainly test what they consider important features and make some fixes if necessary but I suspect that Lazarus is not on their 'important' list. In this case, you need to install  libgtk2.0-dev and its not obvious to me why its not possible, I have a 22.04 VM here with it installed (easily).  And you need install libpango1.0-dev and it needs (eg) gir1.2-pango-1.0 but seems the official Ubuntu package is 1.50.6+ds-2ubuntu1 - that would indicate Ubuntu made a change, renamed the package but did not think to patch gir1.2-pango-1.0 in the same way. In most cases, you can solve such problems by manually installing (eg) 1.50.6+ds-2ubuntu1 - it will then, in deb speak, 'provide'  gir1.2-pango and libpango1.0-dev will be happy. So, in both cases, drill down, manually install what is available from the lower levels up and that usually fixes everything. Remember the package name and the things the package provides can and usually do have different names. Every time the package is patched or even re- packaged, the package name changes. Underlying problem here is GTK2 is becoming less and less important to the distros. You could, if necessary, install fpc and fpc-src (getting an up to date compiler, 3.2.2) and then build a current Lazarus Qt5 version from source. Should not be necessary but sure would work. Note that building a GTK2 Lazarus from source will not help you if you have not yet solved the libgtk2.0-dev issue. (Putting that aside, building Lazarus from source is always a good idea.) Don't give up, try those bottom up manual installs and tell us how it goes. Davo ---------------------------------------------------------------------- VisualLab · 2023-07-04 09:49 Quote from: Basenji on July 04, 2023, 02:16:26 amQuote from: TRon on July 04, 2023, 12:48:27 amjust to make sure, before installing libgtk2.0-dev did you ran: $ sudo apt-get update $ sudo apt-get upgrade ? if you have issue with installing libgtk2.0-dev then I doubt there is anything we can do here as that seem to be an issue of your distribution (unless you messed up yourself, though I would have no idea how you would be able to get into this situation. The pixbuf thing is a complicated one though as there are many versions and they can't be installed all at the same time). Yes, exactly as you suggested. Why would I screw up in Ubuntu?)) Yes, the distribution itself is most likely to blame. I have a suspicion that gtk2 needs to be installed. But I personally have no idea how to do it at all. You can install Lazarus on Linux. About 3 months ago I installed Lazarus 2.2.6 on Kubuntu 23.04. I used packages from the site that VTwin provided. Works well. P.S. Most of the problems with installing windows GUI programs in Linux are due to its chaotic and ill-considered construction, development, lack of proper design of this system and ignoring backward compatibility by its programmers (with the possible exception of the kernel). "This is a bazaar, not a cathedral" ---------------------------------------------------------------------- Basenji · 2023-07-04 19:01 So, it turns out that even if such a message about this ill-fated libgtk2.0-dev appears again, you can ignore it. Because one way or another Lazarus himself appears. And now there's a problem again. If run Lazarus, a window appears with a suggestion to either rename or specify something, because the word "make" itself is reserved in the system. If you don't touch it, run it anyway, then the Lazarus environment itself appears. And if you just test an empty form by clicking on the run button, checking the performance of Lazarus. Then a bunch of errors fall out that say something about some missing libraries. ---------------------------------------------------------------------- dbannon · 2023-07-04 21:23 Quote from: Basenji on July 04, 2023, 09:01:18 pm.... And now there's a problem again. If run Lazarus, a window appears with a suggestion to either rename or specify something, because the word "make" itself is reserved in the system. .... I am sorry, you really, really need be more specific than that. It could be the debugger settings, if so, yes, you do want to change it (on current release, trunk and fixes_3 are OK now.  David ---------------------------------------------------------------------- VTwin · 2023-07-05 16:45 I installed a fresh copy of Ubuntu 22.04.2 LTS 64 bit on VirtualBox, downloaded the 3 fpc/lazarus amd64 DEB files into a folder, used the terminal to go to that folder, and ran Code: Text  [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- get install libgtk2.0-devsudo dpkg -i *.deb libgtk2.0-dev is required for the default widget set. It runs fine for me. ---------------------------------------------------------------------- Basenji · 2023-07-06 08:41 Guys. I solved the problem like this: reinstalled Ubuntu 22.04 again. I successfully installed Lazarus, and it works fine. The command should have been written like this: 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 install binutils libgtk2.0-devAnd then you can follow the instructions for installing Lazarus ---------------------------------------------------------------------- TRon · 2023-07-06 14:58 Quote from: Basenji on July 06, 2023, 10:41:19 amGuys. I solved the problem like this: reinstalled Ubuntu 22.04 again. I successfully installed Lazarus, and it works fine. The command should have been written like this: 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 install binutils libgtk2.0-devAnd then you can follow the instructions for installing Lazarus So, the suggestion to install build-essential did not install binutils for you (gcc should drag that in) ? ---------------------------------------------------------------------- Basenji · 2023-07-06 19:02 Quote from: TRon on July 06, 2023, 04:58:41 pmSo, the suggestion to install build-essential did not install binutils for you (gcc should drag that in) ? If I understood you correctly, then I'm afraid that either this information was a little outdated, or for some reason it was silent about it. ---------------------------------------------------------------------- TRon · 2023-07-06 19:11 @Basenji I made the remark as usually people here expect (in trying to help) that you have done (exactly) as instructed on the wiki. So I don't think anyone who reacted so far has considered that you didn't. For us (or at least me) it is simple, I follow the instructions so I also never get to see the error you seem to have ran into. The error message you got is dubious in that it tries to imply that there is something wrong with the gtk2-dev installation while you mention the missing binutils seem to have been the culprit. It is not important other than you got things to work now. We (here) all know that some packages (that you used to install Lazarus) are a bit ... well.. at fault (not installing the correct/required dependencies). But do note that it is difficult to satisfy everyone's need there. If you make use of some functionality of Lazarus/fpc in the provided units/packages then it is possible that you even have to (manually) install other dependencies for example for httpclient and its dependency on ssl for secure connections). ---------------------------------------------------------------------- dbannon · 2023-07-07 01:22 Not wanting to cloud the issue with facts, but looking in the two relevent SourceForge Packages, its seems those dependencies are clearly spelt out - fpc - Pre-Depends: binutils lazarus-project Depends: libgtk2.0-dev (>=2.6.0), fpc-laz (=3.2.2), fpc-src (=3.2.2) Manual install of the dependencies 'should' only be necessary where building from source. (But, as many have said before, a manual install of Lazarus from source on Linux is almost always the best way to go.) Davo