I am trying to add a library folder to my Ubuntu system.
The library folder I am trying to update the system with is:
I have tried the following things:
I first checked
LD_LIBRARY_PATH ervironmental variable:
$ echo $LD_LIBRARY_PATH /usr/local/cuda-9.0/lib64
And it just contains 1 folder (?). Anyway I checked
$ cat /etc/ld.so.conf include /etc/ld.so.conf.d/*.conf
and just included all config files in
-rw-rw-r-- 1 root root 38 Nov 24 2014 fakeroot-x86_64-linux-gnu.conf -rw-r--r-- 1 root root 108 Jan 15 2018 i386-linux-gnu.conf lrwxrwxrwx 1 root root 41 May 15 2018 i386-linux-gnu_EGL.conf -> /etc/alternatives/i386-linux-gnu_egl_conf lrwxrwxrwx 1 root root 40 May 15 2018 i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf -rw-r--r-- 1 root root 44 Jan 27 2016 libc.conf -rw-r--r-- 1 root root 38 Nov 14 17:16 randomLibs.conf -rw-r--r-- 1 root root 26 May 17 10:44 tensorflow_lib.conf -rw-r--r-- 1 root root 68 Apr 15 2016 x86_64-linux-gnu.conf lrwxrwxrwx 1 root root 43 May 15 2018 x86_64-linux-gnu_EGL.conf -> /etc/alternatives/x86_64-linux-gnu_egl_conf lrwxrwxrwx 1 root root 42 Sep 14 17:16 x86_64-linux-gnu_GL.conf -> > /etc/alternatives/x86_64-linux-gnu_gl_conf -rw-r--r-- 1 root root 56 Jan 15 2018 zz_i386-biarch-compat.conf
It contains 11 config files. This seems rather peculiar since 1 link for 11 (non empty) config files does not make sense.
I added manually the folder to the
$ cat /etc/ld.so.conf include /etc/ld.so.conf.d/*.conf /home/user/programs/elastix/lib
$ sudo ldconfig
to update the cache. This error message occurs and I guess nothing is updated also.
/sbin/ldconfig.real: /usr/local/cuda-9.0/lib64/libcudnn.so.7 is not a symbolic link $ echo $LD_LIBRARY_PATH /usr/local/cuda-9.0/lib64
The only way I can make it work is by specifically adding the folder in console:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/programs/elastix/lib $ echo $LD_LIBRARY_PATH /usr/local/cuda-9.0/lib64:/home/user/programs/elastix/lib
So, my question is what's going on here? Why my shared libraries are not updated using
ldconfig and why I can only see 1 folder in
According to this post I could move my shared libraries to these folders:
and make it work but I would like to know what's the problem with the previous approach.
I am using Ubuntu 16.04 by the way.