ldconfig error: is not a symbolic link

后端 未结 5 741
梦如初夏
梦如初夏 2020-12-23 21:16

When running:

    sudo /sbin/ldconfig

the following error appears:

    /sbin/ldconfig: /usr/local/lib/ is not a symbolic li         


        
相关标签:
5条回答
  • 2020-12-23 21:52

    I ran into this issue with the Oracle 11R2 client. Not sure if the Oracle installer did this or someone did it here before i arrived. It was not 64-bit vs 32-bit, all was 64-bit.

    The error was that libexpat.so.1 was not a symbolic link.

    It turned out that there were two identical files, libexpat.so.1.5.2 and libexpat.so.1. Removing the offending file and making it a symlink to the 1.5.2 version caused the error to go away.

    Makes sense that you'd want the well-known name to be a symlink to the current version. If you do this, it's less likely that you'll end up with a stale library.

    0 讨论(0)
  • 2020-12-23 21:55

    Solved, at least at the point of the question.

    I searched in the web before asking, an there were no conclusive solution, the reason why this error is: lib1.so and lib2.so are not OK, very probably where not compiled for a 64 PC, but for a 32 bits machine otherwise lib3.so is a 64 bits lib. At least that is my hipothesis.

    VERY unfortunately ldconfig doesn't give a clean error message informing that it could not load the library, it only pumps:

    ldconfig: /folder_where_the_wicked_lib_is/ is not a symbolic link

    I solved this when I removed the libs not found by ldd over the binary. Now it's easier that I know where lies the problem.

    My ld version: GNU ld version 2.20.51, and I don't know if a most recent version has a better message for its users.

    Thanks.

    0 讨论(0)
  • 2020-12-23 21:56

    You need to include the path of the libraries inside /etc/ld.so.conf, and rerun ldconfig to upate the list

    Other possibility is to include in the env variable LD_LIBRARY_PATH the path to your library, and rerun the executable.

    check the symbolic links if they point to a valid library ...

    You can add the path directly in /etc/ld.so.conf, without include...

    run ldconfig -p to see whether your library is well included in the cache.

    0 讨论(0)
  • 2020-12-23 22:03

    I simply ran the command below:

    export LD_LIBRARY_PATH=/usr/lib/
    

    Now it is working fine.

    0 讨论(0)
  • 2020-12-23 22:14

    simple run in shell : sudo apt-get install --reinstall libexpat1
    got same problem with libxcb - solved in this way - very fast :)

    0 讨论(0)
提交回复
热议问题