Recent

Author Topic: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus  (Read 881 times)

Windsor82

  • Newbie
  • Posts: 3
I just installed Linux Q4OS Aqurius and downloaded Lazarus. Installation seemed to go well, but the first time I tried to open Lazarus I got this error message: "Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus"    What is going on? Also, this does not seem to be the latest version of Lazarus. I got this version from the Q4OS repository. I am running a Dell Latitude 5480 laptop, Intel i5a Ram DDR4, 256 GB SSD.








TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #1 on: March 02, 2025, 10:03:29 pm »
Installation seemed to go well, but the first time I tried to open Lazarus I got this error message: "Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus"    What is going on?
No idea. How did you install it ? with apt ?

Quote
Also, this does not seem to be the latest version of Lazarus. I got this version from the Q4OS repository.
The chosen distribution dictates what is shipped out of the box. That is how Linux works. Especially Debian based distro's are lacking a bit behind. There are other options such as FPCUpDeluxe, the tarballs from sourceforge or compile from source and I believe there are .deb packages somewhere that all are available in newer versions for FPC/Lazarus.
Today is tomorrow's yesterday.

dbannon

  • Hero Member
  • *****
  • Posts: 3371
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #2 on: March 03, 2025, 12:38:46 pm »

Yes, as TRon said, if you use your distro's version of Lazarus, its probably out of date.
Your distro is based on Debian Bookworm, it has Lazarus 2.2.6 so that all makes sense. While using a later Lazarus would be a good idea (as TRon suggested) maybe you want work out why your Lazarus 2.2.6 is not working ? Lots and lots of installs work as expected. I'd very much doubt Aqurius makes any changes to Lazarus !

Did you look to see if /usr/lib/lazarus/2.2.6/lazarus is there ?  Generally, an install like this (in root space) must be started with startlazarus rather than lazarus, so maybe your error came from startlazarus ?

Code: Bash  [Select][+][-]
  1. $> ls -l /usr/lib/lazarus/2.2.6/lazarus

Did you start from the command line or using a menu ?  If menu, then you will be hitting lazarus.desktop and it should have the right command. Such commands go through debian's "alternatives" system, far too complicated and maybe broken by  Aqurius ? Who knows ? Worth trying from the command line, might see some hint of where the problem is, I'd try -

Code: Bash  [Select][+][-]
  1. $> startlazarus
  2.  
  3. and
  4.  
  5. $> /usr/lib/lazarus/2.2.6/startlazarus

If you decide to abandon Lazarus 2.2.6 (and thats a good idea) make sure you remove all traces of your failed Lazarus install before starting a new model. I always suggest installing Lazarus from source into user space, instructions https://wiki.freepascal.org/Installing_Lazarus_on_Linux . You probably have a valid FPC install, test it and if its OK, use it. 

Let us know how you go.

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

Thaddy

  • Hero Member
  • *****
  • Posts: 17148
  • Ceterum censeo Trump esse delendam
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #3 on: March 03, 2025, 02:30:35 pm »
Can't check that but some  debian based distro's install in /usr/local as root, not /usr
so try
Code: Bash  [Select][+][-]
  1. ls -l /usr/local/lib/lazarus/2.2.6/lazarus
I think the official deb file provided by freepascal.org also installs in /usr/local by default (which used to be bloody irritating to me)
« Last Edit: March 03, 2025, 02:38:14 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

dbannon

  • Hero Member
  • *****
  • Posts: 3371
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #4 on: March 04, 2025, 02:23:29 am »
OK, some surprises. The only debian box I have with an official repo lazarus is Trixie->Sid and it has -

  • Lazarus is in /usr/bin/lazarus/3.8
  • The main executable there is not called lazarus, its lazarus-gtk2 (but never, in an install like this use that directly).
  • The desktop file is /usr/share/applications/lazarus-3-8.desktop
  • From the command line, you don't use $> lazarus <enter>, its $> lazarus-ide <enter>
  • lazarus-ide is a symlink, /usr/bin/lazarus-ide to /etc/alternatives/lazarus-ide which is a symlink to /usr/lib/lazarus/3.8/startlazarus


Hmm, no wonder people struggle when they come here looking for help.

Given the above and assuming book worm is similar (except version numbers), I have no idea where you got the reference to /usr/lib/lazarus/2.2.6/lazarus from.  My advice, much stronger now, is to remove all the apt installed lazarus, download a current source (3.8 or 4.0rc2) and build it with "make bigide". Its easy, save and but putting it in your own home directory (rather than root space) a much simpler install.

Using the debain bookworm FPC (3.2.2) is OK but you may consider the release candidate at some point in time. Your call.

Do make sure you remove that existing, failed, lazarus install first !!

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

Windsor82

  • Newbie
  • Posts: 3
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #5 on: March 04, 2025, 08:46:55 pm »
How do you make sure you have uninstalled the original Lazarus installation?

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #6 on: March 04, 2025, 09:21:18 pm »
How do you make sure you have uninstalled the original Lazarus installation?
By verifying whatever method used to install it. If that says it is not installed (anymore) then it should be removed. That usually does leave some after installation created files behind because Lazarus generates them at launching it but if that never happened...

fwiw: <user home directory>/.lazarus (where user home directory is the user that installed and/or invoked Lazarus).
« Last Edit: March 04, 2025, 09:29:02 pm by TRon »
Today is tomorrow's yesterday.

dbannon

  • Hero Member
  • *****
  • Posts: 3371
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #7 on: March 04, 2025, 11:09:17 pm »
.... and check for lazarus files in the places I mentioned a couple of posts up. If the install failed, some may have been installed but not all. When that happens, an un-install can also fail to remove everything.

Then check you have a working fpc still -

Code: Bash  [Select][+][-]
  1. $> fpc -vh <enter>

Should see a version number and a menion of a config file (also complaint about no file to compile but don't worry about that).

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

Windsor82

  • Newbie
  • Posts: 3
Re: Can't find the lazarus executable /usr/lib/lazarus/2.2.6/lazarus
« Reply #8 on: March 07, 2025, 11:33:31 pm »
Thanks for all the help. I went to the Sourceforge.net location for Lazarus (https://sourceforge.net/projects/lazaru … rus%203.8/) and got all 3 necessary Debian files. Downloaded them and when I clicked on each file Q4OS installed them flawlessly! It seems that the Q4OS repository for Lazarus needs to be updated.

 

TinyPortal © 2005-2018