首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Solaris是如何决定库路径的?

问Solaris是如何决定库路径的?
EN

Stack Overflow用户
提问于 2014-11-03 08:32:54
回答 1查看 1.2K关注 0票数 1

在Solaris上,我可以使用crle命令配置库路径,如下所示:

代码语言:javascript
复制
crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/local/lib:/opt/DSI/32

我还可以使用传统的LD_LIBRARY_PATH方法,如:

代码语言:javascript
复制
LD_LIBRARY_PATH="/export/home/donald/mysql-5.0.91-installed/lib/mysql/:/lib:/usr/lib"

Solaris是如何决定库路径的?例如,Solaris是否首先从crle path中选择,然后从LD_LIBRARY_PATH中进行选择?我试着google,但找不到答案。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-03 08:43:56

答案在手册(ManL.D.so.1)中。

代码语言:javascript
复制
 The runtime linker uses a prescribed search path for  locat-
 ing  the  dynamic  dependencies  of  an  object. The default
 search paths are the runpath recorded in  the  object,  fol-
 lowed  by  a  series  of  defaults.  For 32-bit objects, the
 defaults are /lib followed by /usr/lib. For 64-bit  objects,
 the  defaults  are  /lib/64  followed  by /usr/lib/64. These
 defaults component can be  modified  using  a  configuration
 file  that is created with crle(1). The runpath is specified
 when the dynamic object is constructed using the  -R  option
 to  ld(1).  The  environment variable LD_LIBRARY_PATH can be
 used to indicate  directories  to  be  searched  before  the
 default directories.

因此,命令是:

  1. LD_LIBRARY_PATH
  2. 共享对象RPATH
  3. crle默认值
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26710440

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档