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.










share|improve this question
























  • Please code formatting for command output, not quote formatting.
    – muru
    2 days ago










  • And how it would be distinguished by command evoking?
    – Eypros
    2 days ago










  • Put a $ in front of the command.
    – muru
    2 days ago















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.










share|improve this question
























  • Please code formatting for command output, not quote formatting.
    – muru
    2 days ago










  • And how it would be distinguished by command evoking?
    – Eypros
    2 days ago










  • Put a $ in front of the command.
    – muru
    2 days ago













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.










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago

























asked 2 days ago









Eypros

1137




1137












  • Please code formatting for command output, not quote formatting.
    – muru
    2 days ago










  • And how it would be distinguished by command evoking?
    – Eypros
    2 days ago










  • Put a $ in front of the command.
    – muru
    2 days ago


















  • Please code formatting for command output, not quote formatting.
    – muru
    2 days ago










  • And how it would be distinguished by command evoking?
    – Eypros
    2 days ago










  • Put a $ in front of the command.
    – muru
    2 days ago
















Please code formatting for command output, not quote formatting.
– muru
2 days ago




Please code formatting for command output, not quote formatting.
– muru
2 days ago












And how it would be distinguished by command evoking?
– Eypros
2 days ago




And how it would be distinguished by command evoking?
– Eypros
2 days ago












Put a $ in front of the command.
– muru
2 days ago




Put a $ in front of the command.
– muru
2 days ago










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).






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    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

























    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).






    share|improve this answer

























      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).






      share|improve this answer























        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).






        share|improve this answer












        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).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        Simon Sudler

        1,215211




        1,215211






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei