Recent

Author Topic: i Just install Lazarus on freebsd  (Read 3332 times)

nick1965

  • New Member
  • *
  • Posts: 23
i Just install Lazarus on freebsd
« on: November 15, 2021, 10:38:12 am »
I am trying to install Indy10 from package manager and i get error

Cannot Open Package file
Cannot Install package "indylaz.lpk"

sould i login as a root or something?

Answer:
yeap need to login as root.
« Last Edit: November 15, 2021, 10:40:52 am by nick1965 »

BSaidus

  • Hero Member
  • *****
  • Posts: 545
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: i Just install Lazarus on freebsd
« Reply #1 on: November 15, 2021, 10:41:15 am »
Go to where you download Indy package and install it manually
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

nick1965

  • New Member
  • *
  • Posts: 23
Re: i Just install Lazarus on freebsd
« Reply #2 on: November 15, 2021, 11:24:25 am »
I logged in as root and the manager installed corectly
The problem now is that

I get error 232 when i try to use TidHttpserver

Code: Pascal  [Select][+][-]
  1. uses
  2.   IdContext,
  3.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, IdHTTPServer, IdCustomHTTPServer;
  4.  
  5. procedure TForm1.IdHTTPServer1CommandGet(AContext: TIdContext;
  6.   ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
  7. begin
  8. aresponseinfo.contenttext:='Hello world';
  9. end;

What is the problem?

[Edited to add code tags - please read How to use the Forums.]
« Last Edit: November 15, 2021, 11:27:57 am by trev »

dbannon

  • Hero Member
  • *****
  • Posts: 2791
    • tomboy-ng, a rewrite of the classic Tomboy
Re: i Just install Lazarus on freebsd
« Reply #3 on: November 15, 2021, 01:09:03 pm »
sould i login as a root or something?

As a general rule, the answer to that question is almost always 'NO' !

All lazarus packages are installed in user space, doing it as root will leave some file owned by root, bad !

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

nick1965

  • New Member
  • *
  • Posts: 23
Re: i Just install Lazarus on freebsd
« Reply #4 on: November 15, 2021, 02:17:27 pm »
so explain me pelase why  when i try as root all packages installed corectly
and why when i try as single user i get error on package.

is it a lazarus Bug????

dbannon

  • Hero Member
  • *****
  • Posts: 2791
    • tomboy-ng, a rewrite of the classic Tomboy
Re: i Just install Lazarus on freebsd
« Reply #5 on: November 16, 2021, 12:03:34 am »
so explain me pelase why  when i try as root all packages installed corectly
and why when i try as single user i get error on package.

is it a lazarus Bug????

Possibly because you have used root to do some other config thing and you already have that problem I mentioned.

You have not told us how you installed Lazarus in the first place, I am not familiar with freebsd so don't even know what the default is. My guess is if you describe your install model, it will all become clear. It might be worthwhile checking to see if there are any root owned files in your lazarus config directory, probably ~/.lazarus/

As a general comment, Lazarus on Unix like systems installed from packages must be started using the startlazarus command to ensure the remapping from root to user space works.  Lazarus compiled from source, IMHO always a better solution, can be started using lazarus command (although I believe startlazarus does no harm).

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

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: i Just install Lazarus on freebsd
« Reply #6 on: November 16, 2021, 12:14:47 am »
It's a FreeBSD permissions problem which explains why using root or sudo works.

See  BugTracker.

I haven't had time to track down the cause.

dbannon

  • Hero Member
  • *****
  • Posts: 2791
    • tomboy-ng, a rewrite of the classic Tomboy
Re: i Just install Lazarus on freebsd
« Reply #7 on: November 16, 2021, 01:53:28 am »
Wow, in that case, nick1965, I appologise, yes, it is a Lazarus bug !

And a strange one at that.  My suggestion is now definitely try to install Lazarus from source and see if it is still a problem. The model that Lazarus uses on Unix to allow people to use package managers to install (and therefore install in root space) but still give you, the user/programmer write access is complicated. Clever for sure but complicated things go wrong. Install from source, the linux instructions will probably be all you need.

And please let us know if that fixes the bug !

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

nick1965

  • New Member
  • *
  • Posts: 23
Re: i Just install Lazarus on freebsd
« Reply #8 on: November 16, 2021, 12:10:32 pm »
My problem was the AV i was getting on idhttpserver
I Define UseCThreads and everything works Fine.

thank you.

 

TinyPortal © 2005-2018