我使用的是ubuntu 12.04。每次我启动 bash 终端以及每次输入完命令(并按 Enter 键)时,我都会收到以下消息:
错误:ld.so:对象 '/usr/lib/liblunar-calendar-preload.so' 来自
LD_PRELOAD 无法预加载:被忽略。
真奇怪。
那么环境变量LD_PRELOAD是用来做什么的呢?幕后到底发生了什么?
Thanks.
链接器会考虑一些环境变量。一个是LD_PRELOAD
from man 8 ld-linux
:
LD_PRELOAD
A whitespace-separated list of additional, user-specified, ELF
shared libraries to be loaded before all others. This can be
used to selectively override functions in other shared
libraries. For setuid/setgid ELF binaries, only libraries in
the standard search directories that are also setgid will be
loaded.
因此,链接器将尝试加载列出的库LD_PRELOAD
在加载其他变量之前。
变量内部列出了一个无法预加载的库,可能会出现什么情况。看看你的内心.bashrc
or .bash_profile
的环境LD_PRELOAD
设置并从变量中删除该库。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)