2

When I launch digikam I get an error about a cuda missing library (this is happening since I removed cuda more or less cleanly to solve something else):

hippo@hippo-camp:~$ digikam<BR>
digikam: error while loading shared libraries: libcudart.so.8.0: cannot open shared object file: No such file or directory<BR>
hippo@hippo-camp:~$ which digikam<BR>
/usr/bin/digikam<BR>
hippo@hippo-camp:~$ lddtree /usr/bin/digikam<BR>
digikam => /usr/bin/digikam (interpreter => /lib64/ld-linux-x86-64.so.2)<BR>
-     libdigikamgui.so.5.6.0 => /usr/lib/digikam/libdigikamgui.so.5.6.0<BR>
--        libopencv_core.so.3.2 => /usr/local/lib/libopencv_core.so.3.2      
---             libcudart.so.8.0 => not found

as you can see libcudart is a dependency of opencv. I think it is linked to the face recognition feature which I don't really need.

How can I fix this? is there a way to install just the lib?

I have tried to reinstall cuda from scratch but it only gives me version 9 or 10. And I cannot reinstall version 8 from NVIDIA site because I am now in 18.04.3 LTS and it is only supported on version 16.04.

I have tried --purge and reinstall digikam but it does not fix the problem.

sudo apt-get install libopencv-dev python3-opencv --reinstall

did not solve it neither.

EDIT: the library is not anymore on this machine and I don't have a cuda-8 directory anywhere.

How can I fix this situation?

damadam
  • 2,815
  • 3
  • 17
  • 38
wotter
  • 188
  • 1
  • 14

3 Answers3

1

If you have not forced/bad-removed cuda package and you cannot start digikam, then this is a bug!
And I suggest you to open an issue in the bug tracker.

If digikam does not start because it requires that lib, some package (digikam itself or any of its dependencies) is missing lib.


If you want digikam without that dependency, you can try to compile it by yourself disabling (if it can be!) the feature which requires cuda.

mattia.b89
  • 712
  • 5
  • 12
  • ok, I'll give a try to a report upstream – wotter Nov 17 '19 at 22:57
  • upstream does not consider this as a bug + the ubuntu package is an old version – wotter Nov 22 '19 at 01:13
  • @wotter I assumed it was latest version! And I agree with them if they reject the issue; Why do you use that version? Why don't you use latest? Update OP with these information – mattia.b89 Nov 22 '19 at 06:08
  • it is the latest version of the ubuntu package and this package contains an old version of digikam – wotter Nov 22 '19 at 13:12
  • Oh, probably I was wrong saying *upstream*! You have to report it in the Ubuntu bug-tracker since it's an issue related to compilation/packaging not to software itself – mattia.b89 Nov 22 '19 at 14:44
1

It looks like it is not able to find library in path. You can try exporting path according to cuda libarary version installed.

export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-8.0/bin:$PATH
KK Patel
  • 18,693
  • 14
  • 57
  • 79
1

Try installing appropriate version of CUDA in your distribution and create symbolic link:

  1. Install CUDA.

  2. Locate libcudart.so:

    sudo find / -type f -iname "libcudart.so*"
    
  3. Create symbolic link:

    sudo ln -s [located place] /usr/lib/x86_64-linux-gnu/libcudart.so.8.0 
    

    Put in [located place] the output of second step

Hope this helps...

Olimjon
  • 6,982
  • 2
  • 25
  • 51
  • Have to use --override, even with this option I get: Driver: Not Selected / Toolkit: Installation Failed / Samples: Not Selected Logfile is /tmp/cuda_install_18660.log – wotter Nov 22 '19 at 01:09
  • in the log: Can't locate InstallUtils.pm in @INC (you may need to install the InstallUtils module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./install-linux.pl line 6. – wotter Nov 22 '19 at 01:10
  • @wotter, it seems runfile is also not compatible, I will edit the answer. – Olimjon Nov 22 '19 at 05:51
  • option 2 makes sense, I'll give it a try (not fan of option 1, I'd rather use apt so I can purge later but I see no anaconda package) – wotter Nov 22 '19 at 13:18
  • sudo ln -s /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudart.so /usr/lib/x86_64-linux-gnu/libcudart.so.8.0 did the trick, thanks for your help – wotter Nov 22 '19 at 16:02