Recent

Author Topic: The problem with installing lazarus 2.2.6 in Ubuntu 22.04  (Read 6841 times)

Basenji

  • New member
  • *
  • Posts: 7
The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« on: July 03, 2023, 06:00:13 pm »
Hello everybody! I tried to install lazarus latest version in Ubuntu 22.04 using the command:

Code: Bash  [Select][+][-]
  1. 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][+][-]
  1. Some packages could not be installed. This may mean that you have
  2. requested an impossible situation or if you are using the unstable
  3. distribution that some required packages have not yet been created
  4. or been moved out of Incoming.
  5. The following information may help to resolve the situation:
  6.  
  7. The following packages have unmet dependencies:
  8.  libgtk2.0-dev : Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or
  9.                           libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not installable
  10.                  Recommends: debhelper but it is not installable
  11.  libpango1.0-dev : Depends: gir1.2-pango-1.0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  12.                    Depends: libpango-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  13.                    Depends: libpangocairo-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  14.                    Depends: libpangoft2-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  15.                    Depends: libpangoxft-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  16.                    Depends: pango1.0-tools (= 1.50.6+ds-2)
  17. E: Unable to correct problems, you have held broken packages.

Okay, I'll install this library. But again the same thing:

Code: Bash  [Select][+][-]
  1. The following packages have unmet dependencies:
  2.  libgtk2.0-dev : Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or
  3.                           libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not installable
  4.                  Recommends: debhelper but it is not installable
  5.  libpango1.0-dev : Depends: gir1.2-pango-1.0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  6.                    Depends: libpango-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  7.                    Depends: libpangocairo-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  8.                    Depends: libpangoft2-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  9.                    Depends: libpangoxft-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  10.                    Depends: pango1.0-tools (= 1.50.6+ds-2)
  11. E: Unable to correct problems, you have held broken packages.

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #1 on: July 03, 2023, 10:19:26 pm »
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][+][-]
  1. sudo apt-get install libgtk2.0-dev
  2. sudo dpkg -i *.deb
“Talk is cheap. Show me the code.” -Linus Torvalds

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

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #2 on: July 03, 2023, 10:39:03 pm »
Code: Pascal  [Select][+][-]
  1. sudo apt-get -f install

has helped me fix broken dependencies.

Note that I am on Ubuntu 18.04.3
« Last Edit: July 03, 2023, 10:44:53 pm by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

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

Basenji

  • New member
  • *
  • Posts: 7
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #3 on: July 03, 2023, 11:11:02 pm »
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][+][-]
  1. sudo apt-get install libgtk2.0-dev
  2. sudo dpkg -i *.deb

Yes, I followed the instructions carefully step by step.
But the problem lies in
Code: Bash  [Select][+][-]
  1. sudo apt-get install libgtk2.0-dev
because this is the message:
Code: Bash  [Select][+][-]
  1. Some packages could not be installed. This may mean that you have
  2. requested an impossible situation or if you are using the unstable
  3. distribution that some required packages have not yet been created
  4. or been moved out of Incoming.
  5. The following information may help to resolve the situation:
  6.  
  7. The following packages have unmet dependencies:
  8.  libgtk2.0-dev : Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or
  9.                           libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not installable
  10.                  Recommends: debhelper but it is not installable
  11.  libpango1.0-dev : Depends: gir1.2-pango-1.0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  12.                    Depends: libpango-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  13.                    Depends: libpangocairo-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  14.                    Depends: libpangoft2-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  15.                    Depends: libpangoxft-1.0-0 (= 1.50.6+ds-2) but 1.50.6+ds-2ubuntu1 is to be installed
  16.                    Depends: pango1.0-tools (= 1.50.6+ds-2)
  17. E: Unable to correct problems, you have held broken packages.

Basenji

  • New member
  • *
  • Posts: 7
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #4 on: July 03, 2023, 11:13:43 pm »
Code: Pascal  [Select][+][-]
  1. 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][+][-]
  1. sudo apt-get -f install
but the reaction is 0.

Maybe you did everything because you have Ubuntu 18.04.3 and I have Ubuntu 22.04?

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #5 on: July 03, 2023, 11:36:48 pm »
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.
« Last Edit: July 03, 2023, 11:38:59 pm by VTwin »
“Talk is cheap. Show me the code.” -Linus Torvalds

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

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #6 on: July 04, 2023, 12:48:27 am »
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).
Today is tomorrow's yesterday.

Basenji

  • New member
  • *
  • Posts: 7
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #7 on: July 04, 2023, 02:16:26 am »
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).

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

  • Hero Member
  • *****
  • Posts: 3777
    • tomboy-ng, a rewrite of the classic Tomboy
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #8 on: July 04, 2023, 02:52:59 am »
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
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

VisualLab

  • Hero Member
  • *****
  • Posts: 721
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #9 on: July 04, 2023, 11:49:52 am »
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).

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" :)
« Last Edit: July 04, 2023, 11:37:46 pm by VisualLab »

Basenji

  • New member
  • *
  • Posts: 7
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #10 on: July 04, 2023, 09:01:18 pm »
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

  • Hero Member
  • *****
  • Posts: 3777
    • tomboy-ng, a rewrite of the classic Tomboy
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #11 on: July 04, 2023, 11:23:01 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
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #12 on: July 05, 2023, 06:45:28 pm »
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][+][-]
  1. sudo apt-get install libgtk2.0-dev
  2. sudo dpkg -i *.deb


libgtk2.0-dev is required for the default widget set. It runs fine for me.

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

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

Basenji

  • New member
  • *
  • Posts: 7
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #13 on: July 06, 2023, 10:41:19 am »
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][+][-]
  1. sudo apt install binutils libgtk2.0-dev
And then you can follow the instructions for installing Lazarus

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: The problem with installing lazarus 2.2.6 in Ubuntu 22.04
« Reply #14 on: July 06, 2023, 04:58:41 pm »
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][+][-]
  1. sudo apt install binutils libgtk2.0-dev
And 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) ?
Today is tomorrow's yesterday.

 

TinyPortal © 2005-2018