Why do I get â/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.7 is not a symbolic linkâ?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
2
down vote
favorite
After installing CUDA toolkit anc cuDNN successfully without any issues, whenever I do :
sudo ldconfig
I get the :
/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.7 is not a symbolic link
error message.
what is the reason and how can I resolve this?
By the way, I have installed cuDNN like this :
# cuDNN
tar xvf cudnn*.tgz
sudo cp lib64/* /usr/local/cuda/lib64
sudo cp include/* /usr/local/cuda/include
The output of ls -lha libcudnn*
in /usr/local/cuda/lib64
is as follows:
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
16.04 nvidia cuda
add a comment |Â
up vote
2
down vote
favorite
After installing CUDA toolkit anc cuDNN successfully without any issues, whenever I do :
sudo ldconfig
I get the :
/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.7 is not a symbolic link
error message.
what is the reason and how can I resolve this?
By the way, I have installed cuDNN like this :
# cuDNN
tar xvf cudnn*.tgz
sudo cp lib64/* /usr/local/cuda/lib64
sudo cp include/* /usr/local/cuda/include
The output of ls -lha libcudnn*
in /usr/local/cuda/lib64
is as follows:
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
16.04 nvidia cuda
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
After installing CUDA toolkit anc cuDNN successfully without any issues, whenever I do :
sudo ldconfig
I get the :
/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.7 is not a symbolic link
error message.
what is the reason and how can I resolve this?
By the way, I have installed cuDNN like this :
# cuDNN
tar xvf cudnn*.tgz
sudo cp lib64/* /usr/local/cuda/lib64
sudo cp include/* /usr/local/cuda/include
The output of ls -lha libcudnn*
in /usr/local/cuda/lib64
is as follows:
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
16.04 nvidia cuda
After installing CUDA toolkit anc cuDNN successfully without any issues, whenever I do :
sudo ldconfig
I get the :
/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.7 is not a symbolic link
error message.
what is the reason and how can I resolve this?
By the way, I have installed cuDNN like this :
# cuDNN
tar xvf cudnn*.tgz
sudo cp lib64/* /usr/local/cuda/lib64
sudo cp include/* /usr/local/cuda/include
The output of ls -lha libcudnn*
in /usr/local/cuda/lib64
is as follows:
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
16.04 nvidia cuda
16.04 nvidia cuda
edited Apr 17 at 20:47
asked Apr 17 at 20:29
![](https://i.stack.imgur.com/tVxeu.jpg?s=32&g=1)
![](https://i.stack.imgur.com/tVxeu.jpg?s=32&g=1)
Breeze
382420
382420
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Thanks to dear God I found the solution using this link.
This may happen when you run sudo ldconfig after copying cuDNN files.
After installing
cuDNN
, copying the extracted files to
/usr/lib/cuda/lib64
and creating the symlinks, things may go wrong
with the symlinks.
So go to
/usr/local/cuda/lib64/
and run ls -lha libcudnn*.
You should see two symlinks (bold teal) and one single file. Something
like this:/usr/local/cuda/lib64$ ls -lha libcudnn*
lrwxrwxrwx 1 root root 13 Dez 25 23:56 libcudnn.so -> libcudnn.so.5
lrwxrwxrwx 1 root root 17 Dez 25 23:55 libcudnn.so.5 -> libcudnn.so.5.1.5
-rwxr-xr-x 1 root root 76M Dez 25 23:27 libcudnn.so.5.1.5
The exact version of libcudnn.so.5.1.5 maybe be a little different for
you (maybe libcudnn.so.5.1.10). In that case, adapt the code
accordingly
If
libcudnn.so
andlibcudnn.so.5
are not symlinks then this is the
reason why you got this error. If so, this is what you need to do:/usr/local/cuda/lib64$ sudo rm libcudnn.so
/usr/local/cuda/lib64$ sudo rm libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5.1.5 libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5 libcudnn.so
Run sudo ldconfig again and there should be no errors
After running the ls -lha libcudnn*
in /usr/local/cuda/lib64
and seeing :
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
I had to do :
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so
[sudo] password for breeze:
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7.0.5 libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7 libcudnn.so
breeze@breeze:/usr/local/cuda/lib64$ sudo ldconfig
And everything is back to normal:)
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Thanks to dear God I found the solution using this link.
This may happen when you run sudo ldconfig after copying cuDNN files.
After installing
cuDNN
, copying the extracted files to
/usr/lib/cuda/lib64
and creating the symlinks, things may go wrong
with the symlinks.
So go to
/usr/local/cuda/lib64/
and run ls -lha libcudnn*.
You should see two symlinks (bold teal) and one single file. Something
like this:/usr/local/cuda/lib64$ ls -lha libcudnn*
lrwxrwxrwx 1 root root 13 Dez 25 23:56 libcudnn.so -> libcudnn.so.5
lrwxrwxrwx 1 root root 17 Dez 25 23:55 libcudnn.so.5 -> libcudnn.so.5.1.5
-rwxr-xr-x 1 root root 76M Dez 25 23:27 libcudnn.so.5.1.5
The exact version of libcudnn.so.5.1.5 maybe be a little different for
you (maybe libcudnn.so.5.1.10). In that case, adapt the code
accordingly
If
libcudnn.so
andlibcudnn.so.5
are not symlinks then this is the
reason why you got this error. If so, this is what you need to do:/usr/local/cuda/lib64$ sudo rm libcudnn.so
/usr/local/cuda/lib64$ sudo rm libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5.1.5 libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5 libcudnn.so
Run sudo ldconfig again and there should be no errors
After running the ls -lha libcudnn*
in /usr/local/cuda/lib64
and seeing :
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
I had to do :
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so
[sudo] password for breeze:
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7.0.5 libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7 libcudnn.so
breeze@breeze:/usr/local/cuda/lib64$ sudo ldconfig
And everything is back to normal:)
add a comment |Â
up vote
3
down vote
accepted
Thanks to dear God I found the solution using this link.
This may happen when you run sudo ldconfig after copying cuDNN files.
After installing
cuDNN
, copying the extracted files to
/usr/lib/cuda/lib64
and creating the symlinks, things may go wrong
with the symlinks.
So go to
/usr/local/cuda/lib64/
and run ls -lha libcudnn*.
You should see two symlinks (bold teal) and one single file. Something
like this:/usr/local/cuda/lib64$ ls -lha libcudnn*
lrwxrwxrwx 1 root root 13 Dez 25 23:56 libcudnn.so -> libcudnn.so.5
lrwxrwxrwx 1 root root 17 Dez 25 23:55 libcudnn.so.5 -> libcudnn.so.5.1.5
-rwxr-xr-x 1 root root 76M Dez 25 23:27 libcudnn.so.5.1.5
The exact version of libcudnn.so.5.1.5 maybe be a little different for
you (maybe libcudnn.so.5.1.10). In that case, adapt the code
accordingly
If
libcudnn.so
andlibcudnn.so.5
are not symlinks then this is the
reason why you got this error. If so, this is what you need to do:/usr/local/cuda/lib64$ sudo rm libcudnn.so
/usr/local/cuda/lib64$ sudo rm libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5.1.5 libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5 libcudnn.so
Run sudo ldconfig again and there should be no errors
After running the ls -lha libcudnn*
in /usr/local/cuda/lib64
and seeing :
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
I had to do :
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so
[sudo] password for breeze:
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7.0.5 libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7 libcudnn.so
breeze@breeze:/usr/local/cuda/lib64$ sudo ldconfig
And everything is back to normal:)
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Thanks to dear God I found the solution using this link.
This may happen when you run sudo ldconfig after copying cuDNN files.
After installing
cuDNN
, copying the extracted files to
/usr/lib/cuda/lib64
and creating the symlinks, things may go wrong
with the symlinks.
So go to
/usr/local/cuda/lib64/
and run ls -lha libcudnn*.
You should see two symlinks (bold teal) and one single file. Something
like this:/usr/local/cuda/lib64$ ls -lha libcudnn*
lrwxrwxrwx 1 root root 13 Dez 25 23:56 libcudnn.so -> libcudnn.so.5
lrwxrwxrwx 1 root root 17 Dez 25 23:55 libcudnn.so.5 -> libcudnn.so.5.1.5
-rwxr-xr-x 1 root root 76M Dez 25 23:27 libcudnn.so.5.1.5
The exact version of libcudnn.so.5.1.5 maybe be a little different for
you (maybe libcudnn.so.5.1.10). In that case, adapt the code
accordingly
If
libcudnn.so
andlibcudnn.so.5
are not symlinks then this is the
reason why you got this error. If so, this is what you need to do:/usr/local/cuda/lib64$ sudo rm libcudnn.so
/usr/local/cuda/lib64$ sudo rm libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5.1.5 libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5 libcudnn.so
Run sudo ldconfig again and there should be no errors
After running the ls -lha libcudnn*
in /usr/local/cuda/lib64
and seeing :
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
I had to do :
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so
[sudo] password for breeze:
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7.0.5 libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7 libcudnn.so
breeze@breeze:/usr/local/cuda/lib64$ sudo ldconfig
And everything is back to normal:)
Thanks to dear God I found the solution using this link.
This may happen when you run sudo ldconfig after copying cuDNN files.
After installing
cuDNN
, copying the extracted files to
/usr/lib/cuda/lib64
and creating the symlinks, things may go wrong
with the symlinks.
So go to
/usr/local/cuda/lib64/
and run ls -lha libcudnn*.
You should see two symlinks (bold teal) and one single file. Something
like this:/usr/local/cuda/lib64$ ls -lha libcudnn*
lrwxrwxrwx 1 root root 13 Dez 25 23:56 libcudnn.so -> libcudnn.so.5
lrwxrwxrwx 1 root root 17 Dez 25 23:55 libcudnn.so.5 -> libcudnn.so.5.1.5
-rwxr-xr-x 1 root root 76M Dez 25 23:27 libcudnn.so.5.1.5
The exact version of libcudnn.so.5.1.5 maybe be a little different for
you (maybe libcudnn.so.5.1.10). In that case, adapt the code
accordingly
If
libcudnn.so
andlibcudnn.so.5
are not symlinks then this is the
reason why you got this error. If so, this is what you need to do:/usr/local/cuda/lib64$ sudo rm libcudnn.so
/usr/local/cuda/lib64$ sudo rm libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5.1.5 libcudnn.so.5
/usr/local/cuda/lib64$ sudo ln libcudnn.so.5 libcudnn.so
Run sudo ldconfig again and there should be no errors
After running the ls -lha libcudnn*
in /usr/local/cuda/lib64
and seeing :
breeze@breeze:/usr/local/cuda/lib64$ ls -lha libcudnn*
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7
-rwxr-xr-x 1 root root 275M âÃÂñÃÂà15 12:03 libcudnn.so.7.0.5
-rw-r--r-- 1 root root 268M âÃÂñÃÂà15 12:03 libcudnn_static.a
I had to do :
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so
[sudo] password for breeze:
breeze@breeze:/usr/local/cuda/lib64$ sudo rm libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7.0.5 libcudnn.so.7
breeze@breeze:/usr/local/cuda/lib64$ sudo ln libcudnn.so.7 libcudnn.so
breeze@breeze:/usr/local/cuda/lib64$ sudo ldconfig
And everything is back to normal:)
answered Apr 17 at 21:00
![](https://i.stack.imgur.com/tVxeu.jpg?s=32&g=1)
![](https://i.stack.imgur.com/tVxeu.jpg?s=32&g=1)
Breeze
382420
382420
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1025928%2fwhy-do-i-get-sbin-ldconfig-real-usr-local-cuda-lib64-libcudnn-so-7-is-not-a%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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