Recent

Author Topic: Raspberry 5 Bookworm Lazarus unsolved dependency install error  (Read 1481 times)

MichaelSw

  • Newbie
  • Posts: 6
Hello,
Ive tried various methods installing lazarus on Bookworm and failed.
1. sudo apt-get install lazarus - this one does not work
2. sudo apt install lazarus-project_4.0.0-0_arm64.deb - E: Unable to locate package lazarus-project_4.0.0-0_arm64.deb
While installing above .deb files I also get: unmet dependencies libgtk2.0-dev.
I tried a lot different methods without success.
I have very clean installation of Raspberry OS 64-bit.
I checked that Linkat installed Lazarus successfully: https://forum.lazarus.freepascal.org/index.php/topic,69123.0.html but this doesnt work.
Is there anything I can do to install Lazarus on Raspberry? What do I wrong?
« Last Edit: May 19, 2025, 11:25:22 pm by MichaelSw »

dbannon

  • Hero Member
  • *****
  • Posts: 3379
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #1 on: May 20, 2025, 01:43:04 am »
Michael, bug reports like this always need details of what did happen as well as what did not. So, instead of "did not work", tell us exactly what error message you got when you ran it.

However, some points -
  • Use apt instead of apt-get, its error messages are far better and it resolves dependencies.
  • When you got the message about "E: unable to locate..." its because you did not explicitly specify the location of the downloaded package (I'm guessing you did download that package before running it ?).  If you are in the same directory as the package, try, eg,
Code: Bash  [Select][+][-]
  1. sudo apt install ./lazarus-project_4.0.0-0_arm64.deb

Note the './' that says "look in this directory".

That should be enough to get you started. If it fails again, send us a screen scrape of what you do, perhaps also of the "ls -l" command.

Using the packages downloaded from Source Forge is far better than installing the Lazarus from bookworm, bookworm is quite old now.

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

MichaelSw

  • Newbie
  • Posts: 6
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #2 on: May 20, 2025, 08:38:57 am »
Thank you for your reply.
This is my bash output:
Code: Bash  [Select][+][-]
  1. admin@ncu:~/Downloads $ sudo apt install ./lazarus-project_4.0.0-0_arm64.deb
  2. Reading package lists... Done
  3. Building dependency tree... Done
  4. Reading state information... Done
  5. Note, selecting 'lazarus-project' instead of './lazarus-project_4.0.0-0_arm64.deb'
  6. Some packages could not be installed. This may mean that you have
  7. requested an impossible situation or if you are using the unstable
  8. distribution that some required packages have not yet been created
  9. or been moved out of Incoming.
  10. The following information may help to resolve the situation:
  11.  
  12. The following packages have unmet dependencies:
  13.  libgtk2.0-dev : Depends: libglib2.0-dev (>= 2.27.3) but it is not installable
  14.                  Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or
  15.                           libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not installable
  16.                  Depends: libpango1.0-dev (>= 1.20) but it is not installable
  17.                  Depends: libatk1.0-dev (>= 1.29.2) but it is not going to be installed
  18.                  Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
  19.                  Depends: libxinerama-dev (>= 1:1.0.1-4.1) but it is not installable
  20.                  Depends: libxi-dev (>= 1:1.0.1-4) but it is not installable
  21.                  Depends: libxrandr-dev (>= 2:1.2.99) but it is not installable
  22.                  Depends: libxcursor-dev but it is not installable
  23.                  Depends: libxfixes-dev (>= 1:3.0.0-3) but it is not installable
  24.                  Depends: libxcomposite-dev (>= 1:0.2.0-3) but it is not installable
  25.                  Depends: libxdamage-dev (>= 1:1.0.1-3) but it is not installable
  26.                  Depends: libxml2-utils but it is not installable
  27.                  Recommends: debhelper but it is not installable
  28. E: Unable to correct problems, you have held broken packages.
  29. admin@ncu:~/Downloads $ ls
  30.  fpc-3-2-4rc1.tgz                    lazarus-project_4.0.0-0_arm64.deb

Any troubleshoot ideas?

Thaddy

  • Hero Member
  • *****
  • Posts: 17178
  • Ceterum censeo Trump esse delendam
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #3 on: May 20, 2025, 08:58:34 am »
Did you forget to install FPC first?
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

MichaelSw

  • Newbie
  • Posts: 6
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #4 on: May 20, 2025, 09:34:01 am »
Yes I did from the source:
Code: Text  [Select][+][-]
  1. https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20arm64%20DEB/Lazarus%204.0

af0815

  • Hero Member
  • *****
  • Posts: 1392
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #5 on: May 20, 2025, 09:38:59 am »
Is the installation of bookworm X11 or Wayland ? And is gtk2 installed ? It looks like a attemp to install Lazarus (gtk2 by default) on a not working gtk2 Environment. Gtk2 is outdated and maybe not available on RasPi 5.

Is fpc working as expected ?
regards
Andreas

MichaelSw

  • Newbie
  • Posts: 6
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #6 on: May 20, 2025, 10:09:59 am »
It's Wayland. FPC is available.
It seems to be issue with gtk2. Is there any solution to fix this?
Code: Bash  [Select][+][-]
  1. admin@ncu:~/Downloads $ sudo apt install libgtk2.0-0 libgtk2.0-dev libgtk2.0-common
  2. Reading package lists... Done
  3. Building dependency tree... Done
  4. Reading state information... Done
  5. libgtk2.0-0 is already the newest version (2.24.33-2+rpt1+deb12u1).
  6. libgtk2.0-0 set to manually installed.
  7. libgtk2.0-common is already the newest version (2.24.33-2+rpt1+deb12u1).
  8. libgtk2.0-common set to manually installed.
  9. Some packages could not be installed. This may mean that you have
  10. requested an impossible situation or if you are using the unstable
  11. distribution that some required packages have not yet been created
  12. or been moved out of Incoming.
  13. The following information may help to resolve the situation:
  14.  
  15. The following packages have unmet dependencies:
  16.  libgtk2.0-dev : Depends: libglib2.0-dev (>= 2.27.3) but it is not installable
  17.                  Depends: libgdk-pixbuf-2.0-dev (>= 2.21.0) but it is not installable or
  18.                           libgdk-pixbuf2.0-dev (>= 2.21.0) but it is not installable
  19.                  Depends: libpango1.0-dev (>= 1.20) but it is not installable
  20.                  Depends: libatk1.0-dev (>= 1.29.2) but it is not going to be installed
  21.                  Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
  22.                  Depends: libxinerama-dev (>= 1:1.0.1-4.1) but it is not installable
  23.                  Depends: libxi-dev (>= 1:1.0.1-4) but it is not installable
  24.                  Depends: libxrandr-dev (>= 2:1.2.99) but it is not installable
  25.                  Depends: libxcursor-dev but it is not installable
  26.                  Depends: libxfixes-dev (>= 1:3.0.0-3) but it is not installable
  27.                  Depends: libxcomposite-dev (>= 1:0.2.0-3) but it is not installable
  28.                  Depends: libxdamage-dev (>= 1:1.0.1-3) but it is not installable
  29.                  Depends: libxml2-utils but it is not installable
  30.                  Recommends: debhelper but it is not installable
  31. E: Unable to correct problems, you have held broken packages.
  32. admin@ncu:~/Downloads $ dpkg -l libgtk2.0-0
  33. Desired=Unknown/Install/Remove/Purge/Hold
  34. | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  35. |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  36. ||/ Name              Version                Architecture Description
  37. +++-=================-======================-============-==================================================
  38. ii  libgtk2.0-0:arm64 2.24.33-2+rpt1+deb12u1 arm64        GTK graphical user interface library - old version

Thaddy

  • Hero Member
  • *****
  • Posts: 17178
  • Ceterum censeo Trump esse delendam
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #7 on: May 20, 2025, 10:31:41 am »
Yes, you can -still - turn off Wayland in the rapberri's configuration.
You can also specify Qt5/6 when building Lazarus, which do behave much better with Wayland.
« Last Edit: May 20, 2025, 10:34:21 am by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

MichaelSw

  • Newbie
  • Posts: 6
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #8 on: May 20, 2025, 12:47:31 pm »
I cant solve Lazarus install on Raspberry. Solve it installing Codetyphon.
Thank you for your help.

LemonParty

  • Full Member
  • ***
  • Posts: 185
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #9 on: May 20, 2025, 01:09:37 pm »
You could try to install Lazarus using https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases.
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

Thaddy

  • Hero Member
  • *****
  • Posts: 17178
  • Ceterum censeo Trump esse delendam
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #10 on: May 20, 2025, 03:34:00 pm »
Codetyphon is usually not the answer here.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

MichaelSw

  • Newbie
  • Posts: 6
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #11 on: May 20, 2025, 05:17:03 pm »
thank you LemonParty, I will try that one.

af0815

  • Hero Member
  • *****
  • Posts: 1392
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #12 on: May 20, 2025, 07:09:18 pm »
If you use FPCUpdeluxe, take care, you install the QT Version instead of GTK. And have the prerequisites installed.
regards
Andreas

dbannon

  • Hero Member
  • *****
  • Posts: 3379
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #13 on: May 22, 2025, 09:37:14 am »
It's Wayland. FPC is available.
Edit : para below is too simplified. Firstly, GTK2 works with Wayland by, as much as it can, ignoring it. Secondly, the switch I mention is only necessary with Qtx.

Should work under Wayland but not nicely, you need to provide a command line switch, "--disableaccurateform", however, as a package install, you start Lazarus with "startlazarus" and can provide that switch there. But that command then calls "lazarus" and probably does not provide the switch ??  Don't know, I never use the packages, always build from source.

Quote
                 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
Wierd, my bookworm has libgdk-pixbuf-2.0 2.42.10 so should be available in the Pi repo.

Quote
                 Depends: libpango1.0-dev (>= 1.20) but it is not installable
I have libpango1.0-dev 1.50.12

similarly for all the other ones listed (I am sure).  Lets be clear here, you obviously have GTK2 available and installed, whats missing are the -dev libraries. It would seem very, very surprising is RasPi people stripped out only some libraries. GTK2 needs to go but when it does it will be all or nothing decision.

I think you need to have a look at how apt list is configured, I don't think its pointing to a viable repository. You could post the result from "cat /etc/apt/sources.list" command.

Yes, building from source a Qt5 version (either directly or using fpcupdeluxe) is an alternative but if your repo is not configured, it will not work either. if you do try for Qt5, you must download newer libqt5pas1 libraries, the ones in bookworm will not work.

Edit : I am pretty sure the Raspi DE does not have an option to turn off Wayland, use it, ready or not (and its "not"). Sorry, I am traveling and don't have a RasPI available to test with.

Anyway, in summary, both GTK and Qt5/6 have dependencies that must be satisfied before you proceed to build or just run a prebuilt binary. Solve the repo problem first.

Davo
« Last Edit: May 22, 2025, 10:08:18 am by dbannon »
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

Linkat

  • New Member
  • *
  • Posts: 22
Re: Raspberry 5 Bookworm Lazarus unsolved dependency install error
« Reply #14 on: May 22, 2025, 10:46:59 am »
Hi,
my best experience to install Lazarus to Raspberry Pi (wayland or x11) is described here (October 2024):
https://forum.lazarus.freepascal.org/index.php/topic,69123.msg536256.html#msg536256

and here (May 2025):

https://lazarusforum.de/viewtopic.php?t=16922

(in the second article)

Meanwhile I've installed Lazarus 4.0 on the Raspi3, too,

Good luck.


 

TinyPortal © 2005-2018