libOTBCommandLine: cannot open shared object

#1

I use
Ubuntu 18.04
QGIS version: 3.6.2-Noosa
QGIS code revision: 656500e
Qt version: 5.9.5
GDAL version: 2.2.3
GEOS version: 3.6.2-CAPI-1.10.2 4d2925d6
PROJ version: 493
An error occurs while executing the algorithm
Algorithm ‘KMeansClassification’
Input parameter:
{ ‘in’ : ‘/home/cnc/work/QGIS/Lakes/Lakes.tif’, ‘out’ : ‘TEMPORARY_OUTPUT’, ‘nc’ : 5, ‘ts’ : 100, ‘maxit’ : 1000, ‘outmeans’ : ‘TEMPORARY_OUTPUT’, ‘sampler’ : ‘periodic’, ‘sampler.periodic.jitter’ : 0, ‘vm’ : None, ‘nodatalabel’ : 0, ‘cleanup’ : True, ‘rand’ : 0, ‘outputpixeltype’ : 5 }
Error
/home/cnc/.OTB/bin/otbApplicationLauncherCommandLine: error while loading shared libraries: libOTBCommandLine-6.6.so.1: cannot open shared object file: No such file or directory
The file “libOTBCommandLine-6.6.so.1” is in the directory
/usr/lib/x86_64-linux-gnu
and
/home/cnc/.OTB/lib
How to make the program work?

#2

Hello,

In QGIS, have you set the OTB application folder and OTB folder variables to the right folder ? (options/processing/providers/OTB)

Cédric

#3

Thanks for your help. Yes, I set the paths to the folders.
OTB application folder ---- /home/ cnc/.OTB/lib/otb/applications
OTB folder ---- /home/ cnc/.OTB/

#4

Hi,
Can you check the following things please and post the command output:

  • make sure you do not have any environment variable like LD_LIBRARY_PATH (echo $LD_LIBRARY_PATH)
  • look at where the otbApplicationLauncherCommandLine is looking for its shared library (ldd /home/cnc/.OTB/bin/otbApplicationLauncherCommandLine)

Also can I ask you why you have the shared lib in /usr/lib/x86_64-linux-gnu? Do you know where it comes from?

NB: you can also do a printenv to check if you do not have any other variables coming from old OTB installation that corrupt the correct behavior of otbApplicationLauncherCommandLine.

Antoine

#5

Hi, Antoine
I installed the program for the first time.
Сommand output:
echo $LD_LIBRARY_PATH
Empty command output

ldd /home/cnc/.OTB/bin/otbApplicationLauncherCommandLine
the output of the command is very large. Here is only one part
linux-vdso.so.1 => (0x00007ffe64661000)
libOTBCommandLine-6.6.so.1 => not found
libOTBApplicationEngine-6.6.so.1 => not found
libOTBImageIO-6.6.so.1 => not found
libOTBIORAD-6.6.so.1 => not found
libOTBIOONERA-6.6.so.1 => not found
libOTBIOLUM-6.6.so.1 => not found
libOTBIOMSTAR-6.6.so.1 => not found
libOTBIOBSQ-6.6.so.1 => not found
libOTBIOTileMap-6.6.so.1 => not found
libOTBCurlAdapters-6.6.so.1 => not found
libcurl.so => /usr/lib/x86_64-linux-gnu/libcurl.so (0x00007f308f017000)
libOTBExtendedFilename-6.6.so.1 => not found
libOTBVectorDataIO-6.6.so.1 => not found
libOTBIOGDAL-6.6.so.1 => not found
libOTBIOKML-6.6.so.1 => not found
libOTBProjection-6.6.so.1 => not found
libOTBVectorDataBase-6.6.so.1 => not found
libOTBImageManipulation-6.6.so.1 => not found
libOTBStreaming-6.6.so.1 => not found
libOTBGdalAdapters-6.6.so.1 => not found
Moutput_command.txt (10.1 KB)
More information in the attached file

#6

Ok, so here you have an installation problem. How did you install OTB? Was there any output when executing the OTB-6.6.0-Linux64.run?

#7

Thanks everyone!
My mistake was to rename the unpacked folder OTB-6.6.1-Linux64 -> OTB