Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1883133
  • 博文数量: 389
  • 博客积分: 7877
  • 博客等级: 少将
  • 技术积分: 4521
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-10 14:02
文章分类

全部博文(389)

文章存档

2024年(1)

2022年(1)

2021年(1)

2020年(1)

2019年(1)

2018年(3)

2017年(6)

2016年(4)

2015年(8)

2014年(15)

2013年(31)

2012年(19)

2011年(47)

2010年(33)

2009年(105)

2008年(109)

2007年(4)

分类: LINUX

2016-03-17 17:34:36

它的工作原理大概是什么样的


/sbin/ldconfig -p | grep krb


http://www.ibm.com/developerworks/library/l-lpic1-102-3/

Loading specific libraries

If you're running an older application that needs a specific older version of a shared library, or if you're developing a new shared library or version of a shared library, you might want to override the default search paths used by the loader. This might also be needed by scripts that use product-specific shared libraries that might be installed in the /opt tree.

Just as you can set the PATH variable to specify a search path for executables, you can set the LD_LIBRARY_PATH variable to a colon-separated list of directories that should be searched for shared libraries before the system ones specified in ld.so.cache. For example, you might use a command like:

export LD_LIBRARY_PATH=/usr/lib/oldstuff:/opt/IBM/AgentController/lib

See Resources for additional details and links to other tutorials in this series.

This concludes our brief introduction to managing shared libraries on Linux.


also read this:
another explain:

前 面已经说明过了,库搜索路径的设置有两种方式:在环境变量 LD_LIBRARY_PATH 中设置以及在 /etc/ld.so.conf 文件中设置。其中,第二种设置方式需要 root 权限,以改变 /etc/ld.so.conf 文件并执行 /sbin/ldconfig 命令。而且,当系统重新启动后,所有的基于 GTK2 的程序在运行时都将使用新安装的 GTK+ 库。不幸的是,由于 GTK+ 版本的改变,这有时会给应用程序带来兼容性的问题,造成某些程序运行不正常。为了避免出现上面的这些情况,在 GTK+ 及其依赖库的安装过程中对于库的搜索路径的设置将采用第一种方式进行。这种设置方式不需要 root 权限,设置也简单:


$ export LD_LIBRARY_PATH=/opt/gtk/lib:$LD_LIBRARY_PATH


可以用下面的命令查看 LD_LIBRAY_PATH 的设置内容:


$ echo $LD_LIBRARY_PATH


至此,库的两种设置就完成了。

阅读(1666) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~