linux 动态链接库

来源:互联网 发布:淘宝仓库发货员 编辑:程序博客网 时间:2024/05/25 12:22

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

原创粉丝点击