欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

linux 动态链接库

程序员文章站 2022-05-12 23:40:23
...

ldconfig is a program to maintain the shared library cache. Updates the necessary links.

  • the cache is stored in /etc/ld.so.cache
  • be default, the shared library files in /usr/lib

  • when a new lib installed not in /usr/lib, an error may occur: error while loading shared libraries xxx.so. Cannot open shared object fileL No such file or directory
    哈哈 可能有更好的解决办法,我的办法是

sudo cp /mydir/libopenblas.so /usr/lib/libopenblas.so && ldconfig

ldd : Tells what libraries a given program needs to run. ldd test

symbolic link

  • also called `soft link’, like a shortcut in Windows

  • to create a symbolic link in Unix, ln -s src_file my_shortcut