Linux动态库搜索路径的设定

来源:互联网 发布:oracle数据导入 编辑:程序博客网 时间:2024/05/16 07:30

动态库的搜索路径搜索的先后顺序是:

  1.编译目标代码时指定的动态库搜索路径;

  2.环境变量LD_LIBRARY_PATH指定的动态库搜索路径;

  3.配置文件/etc/ld.so.conf中指定的动态库搜索路径;

  4.默认的动态库搜索路径/lib;

  5.默认的动态库搜索路径/usr/lib。


1> ldd <program>

vi /etc/ld.so.conf

ldconfig


2> LD_LIBRARY_PATH=

reference:http://soft.chinabyte.com/os/232/11488732_2.shtml

原创粉丝点击