Recent

Author Topic: Run Lazarus program on headless PC  (Read 2799 times)

KarenT

  • Full Member
  • ***
  • Posts: 120
Run Lazarus program on headless PC
« on: November 14, 2017, 04:52:50 pm »
Ubuntu 16.04, Lazarus 1.8 RC-4

Hi, I need to run a few programs I have written on the headless PC.

I have copied the Lazarus Folders for the program to a USB and then on to the headless PC and all but one program runs fine. That errant-one needs SQLite3 and I get the "libsqlite3.so" missing library error. I checked the path (/usr/lib/..." and sure enough, no SQLite files anywhere.

The headless does not have Internet access so I can't simply install SQLite3 with "apt-get."

How do I get and then install SQLite so the program can run?

Thank you.

ahiggins

  • Jr. Member
  • **
  • Posts: 92
Re: Run Lazarus program on headless PC
« Reply #1 on: November 14, 2017, 05:10:58 pm »
is it not just a case of having the libsqlite3.so file in the same directory as the application?

soerensen3

  • Full Member
  • ***
  • Posts: 213
Re: Run Lazarus program on headless PC
« Reply #2 on: November 14, 2017, 05:37:10 pm »
Do you have another computer with Ubuntu? You can just download with
apt -d install ...
it will download the deb file. It can be installed on the headless pc with dpkg -i ...
Replace the dots with the correct package/filename. Make sure to run both commands as root or with sudo.
You could also statically link the .so when compiling in Lazarus; http://forum.lazarus.freepascal.org/index.php?topic=19357.0
Lazarus 1.9 with FPC 3.0.4
Target: Manjaro Linux 64 Bit (4.9.68-1-MANJARO)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Run Lazarus program on headless PC
« Reply #3 on: November 14, 2017, 07:13:32 pm »
How do I get and then install SQLite so the program can run?
  • Download the package using another machine, copy to the headless one, and install using dpkg -i
  • Compile from source, moving the resulting .so somewhere LD_LIBRARY_PATH recognizes (surely /usr/lib included by default)
  • Statically link the library
is it not just a case of having the libsqlite3.so file in the same directory as the application?
No, that's not how things work in Linux :)

KarenT

  • Full Member
  • ***
  • Posts: 120
Re: Run Lazarus program on headless PC
« Reply #4 on: November 14, 2017, 07:52:59 pm »
Thanks everyone, I think I will just install Lazarus on the headless one and that should take care if it all as I assume Lazarus installs it.

That will allow me to make changes to a program if needed, at the risk of interleaved updates on sneaker-net with between the PCs of course. :D

 

TinyPortal © 2005-2018