我使用ubuntu 12.04.每次启动我的bash终端,每次当我完成键入命令(并按回车),我得到这个消息:
ERROR: ld.so: object ‘/usr/lib/liblunar-calendar-preload.so’ from
LD_PRELOAD cannot be preloaded: ignored.
真奇怪.
那么LD_PRELOAD的环境变量是什么?幕后发生了什么?
谢谢.
解决方法
链接器需要一些环境变量.一个是LD_PRELOAD
从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变量中列出的库,然后加载其他库.
可能的情况是,变量内部列出了无法预加载的库.查看设置了LD_PRELOAD的.bashrc或.bash_profile环境,并从该变量中删除该库.