0

I'm trying to deploy a Qt6 application on a Ubuntu 24.04 machine. Here my dist content:

.
├── libQt6Core.so
├── libQt6Core.so.6
├── libQt6Core.so.6.8.0
├── libQt6Gui.so
├── libQt6Gui.so.6
├── libQt6Gui.so.6.8.0
├── libQt6SerialPort.so
├── libQt6SerialPort.so.6
├── libQt6SerialPort.so.6.8.0
├── libQt6Widgets.so
├── libQt6Widgets.so.6
├── libQt6Widgets.so.6.8.0
├── MyApp
└── platforms
    └── libqxcb.so

Then I tried to run MyApp as follow:

$ export LD_LIBRARY_PATH=$(pwd) 
$ echo $LD_LIBRARY_PATH
/home/user/Documents/dist
$ ./MyApp

but it returns:

./MyApp: error while loading shared libraries: libQt6Widgets.so.6: cannot open shared object file: No such file or directory

As you can see the file exists and is there. After exporting theLD_LIBRARY_PATH this is the output of ldd:

$ ldd MyApp
    linux-vdso.so.1 (0x00007ffc29796000)
    libQt6Widgets.so.6 => not found
    libQt6Gui.so.6 => not found
    libQt6SerialPort.so.6 => not found
    libQt6Core.so.6 => not found
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007583d5000000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007583d53ff000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007583d4c00000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007583d5316000)
    /lib64/ld-linux-x86-64.so.2 (0x00007583d545a000)

I read this and this questions (among many others) but I still have issues. Why it does not find the files even if they are there?

Mark
  • 175
  • 1
  • 2
  • 9

0 Answers0