Cannot seem to update my shared libraries path
up vote
0
down vote
favorite
I am trying to add a library folder to my Ubuntu system.
The library folder I am trying to update the system with is: /home/user/programs/elastix/lib
.
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 ld.so.conf
:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
and just included all config files in ld.so.conf.d
folder.
-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 ld.so.conf
file:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/home/user/programs/elastix/lib
and run
$ 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 LD_LIBRARY_PATH
also?
According to this post I could move my shared libraries to these folders:
- /lib/
- /usr/lib/
- /usr/local/lib/
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.
shared-library
add a comment |
up vote
0
down vote
favorite
I am trying to add a library folder to my Ubuntu system.
The library folder I am trying to update the system with is: /home/user/programs/elastix/lib
.
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 ld.so.conf
:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
and just included all config files in ld.so.conf.d
folder.
-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 ld.so.conf
file:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/home/user/programs/elastix/lib
and run
$ 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 LD_LIBRARY_PATH
also?
According to this post I could move my shared libraries to these folders:
- /lib/
- /usr/lib/
- /usr/local/lib/
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.
shared-library
Please code formatting for command output, not quote formatting.
– muru
Nov 15 at 7:50
And how it would be distinguished by command evoking?
– Eypros
Nov 15 at 7:52
Put a$
in front of the command.
– muru
Nov 15 at 8:00
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to add a library folder to my Ubuntu system.
The library folder I am trying to update the system with is: /home/user/programs/elastix/lib
.
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 ld.so.conf
:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
and just included all config files in ld.so.conf.d
folder.
-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 ld.so.conf
file:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/home/user/programs/elastix/lib
and run
$ 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 LD_LIBRARY_PATH
also?
According to this post I could move my shared libraries to these folders:
- /lib/
- /usr/lib/
- /usr/local/lib/
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.
shared-library
I am trying to add a library folder to my Ubuntu system.
The library folder I am trying to update the system with is: /home/user/programs/elastix/lib
.
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 ld.so.conf
:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
and just included all config files in ld.so.conf.d
folder.
-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 ld.so.conf
file:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/home/user/programs/elastix/lib
and run
$ 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 LD_LIBRARY_PATH
also?
According to this post I could move my shared libraries to these folders:
- /lib/
- /usr/lib/
- /usr/local/lib/
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.
shared-library
shared-library
edited Nov 15 at 8:20
asked Nov 15 at 7:47
Eypros
1137
1137
Please code formatting for command output, not quote formatting.
– muru
Nov 15 at 7:50
And how it would be distinguished by command evoking?
– Eypros
Nov 15 at 7:52
Put a$
in front of the command.
– muru
Nov 15 at 8:00
add a comment |
Please code formatting for command output, not quote formatting.
– muru
Nov 15 at 7:50
And how it would be distinguished by command evoking?
– Eypros
Nov 15 at 7:52
Put a$
in front of the command.
– muru
Nov 15 at 8:00
Please code formatting for command output, not quote formatting.
– muru
Nov 15 at 7:50
Please code formatting for command output, not quote formatting.
– muru
Nov 15 at 7:50
And how it would be distinguished by command evoking?
– Eypros
Nov 15 at 7:52
And how it would be distinguished by command evoking?
– Eypros
Nov 15 at 7:52
Put a
$
in front of the command.– muru
Nov 15 at 8:00
Put a
$
in front of the command.– muru
Nov 15 at 8:00
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
There is a naming convention for shared object libraries:
The "real" library file should be named libcudnn.so.7.0
. From that file two soft links should be created:
$ sudo mv /usr/local/cuda-9.0/lib64/libcudnn.so.7 /usr/local/cuda-9.0/lib64/libcudnn.so.7.0
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so.7
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so
This allows the compiler to be called with the -lcudnn
switch. Also ldconfig
seams to verify this convention. See also this (link).
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
There is a naming convention for shared object libraries:
The "real" library file should be named libcudnn.so.7.0
. From that file two soft links should be created:
$ sudo mv /usr/local/cuda-9.0/lib64/libcudnn.so.7 /usr/local/cuda-9.0/lib64/libcudnn.so.7.0
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so.7
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so
This allows the compiler to be called with the -lcudnn
switch. Also ldconfig
seams to verify this convention. See also this (link).
add a comment |
up vote
0
down vote
There is a naming convention for shared object libraries:
The "real" library file should be named libcudnn.so.7.0
. From that file two soft links should be created:
$ sudo mv /usr/local/cuda-9.0/lib64/libcudnn.so.7 /usr/local/cuda-9.0/lib64/libcudnn.so.7.0
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so.7
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so
This allows the compiler to be called with the -lcudnn
switch. Also ldconfig
seams to verify this convention. See also this (link).
add a comment |
up vote
0
down vote
up vote
0
down vote
There is a naming convention for shared object libraries:
The "real" library file should be named libcudnn.so.7.0
. From that file two soft links should be created:
$ sudo mv /usr/local/cuda-9.0/lib64/libcudnn.so.7 /usr/local/cuda-9.0/lib64/libcudnn.so.7.0
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so.7
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so
This allows the compiler to be called with the -lcudnn
switch. Also ldconfig
seams to verify this convention. See also this (link).
There is a naming convention for shared object libraries:
The "real" library file should be named libcudnn.so.7.0
. From that file two soft links should be created:
$ sudo mv /usr/local/cuda-9.0/lib64/libcudnn.so.7 /usr/local/cuda-9.0/lib64/libcudnn.so.7.0
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so.7
$ sudo ln -s /usr/local/cuda-9.0/lib64/libcudnn.so.7.0 /usr/local/cuda-9.0/lib64/libcudnn.so
This allows the compiler to be called with the -lcudnn
switch. Also ldconfig
seams to verify this convention. See also this (link).
answered Nov 15 at 8:28
Simon Sudler
1,225211
1,225211
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093092%2fcannot-seem-to-update-my-shared-libraries-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please code formatting for command output, not quote formatting.
– muru
Nov 15 at 7:50
And how it would be distinguished by command evoking?
– Eypros
Nov 15 at 7:52
Put a
$
in front of the command.– muru
Nov 15 at 8:00