[Lazarus] Built console app on Linux, but won't run on another Linux machine

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Oct 27 12:43:02 CEST 2018

On Sat, 27 Oct 2018 12:25:04 +0200
Bo Berglund via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> Using Lazarus 1.8.4 and FPC 3.0.4 64 bit on Ubuntu 18.04 64 bit.
> Project built and runs fine on dev system.
> Now copied executable to an Ubuntu Server 16.04 64 bit and tried to
> run it. But here I get an immediate error:
> ./LicMgr: error while loading shared libraries: libgdk-x11-2.0.so.0:
> cannot open shared object file: No such file or directory
> In my code there is no such request so it must be something built into
> the executable when compiled on Ubuntu 18.04, but how can I fix this?

Either install libgtk2.0-0 or remove the dependency.

> The dev machine has a GUI interface (otherwise Lazarus would not work)
> but the program itself is purely non-gui, it is just a Pascal program
> and it does not even send output to the console, just handles files
> and networking. Still the name libgdk-x11-2.0 suggests that it has
> something to do with X...

Maybe your project uses the LCL either directly or indirectly. See
Project Inspector.
If yes, remove it or set it to lclwidgettype "nogui".

> Any ideas how I can remove dependencies of whatever libgdk-x11-2.0
> means?
> The Ubuntu Server 16.04 is meant to be the home of this utility...


More information about the Lazarus mailing list