Linux 服务无法加载 /etc/ld.so.conf.d 中的库路径
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18326251/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Linux service can't load library path in the /etc/ld.so.conf.d
提问by JinruiDu
I have a service in Linux.
我在 Linux 中有一项服务。
When I start it use service start or start in init.d
. It can't load config which has stored in /etc/ld.so.conf.d/
. So some process which load the library path in /etc/ld.so.conf.d/.
can't be launched by this service.
当我启动它时,使用 service start 或 start in init.d
。它无法加载存储在/etc/ld.so.conf.d/
. 因此/etc/ld.so.conf.d/.
,此服务无法启动某些加载库路径的进程。
But when I run this service script in shell, it works fine.
但是当我在 shell 中运行这个服务脚本时,它工作正常。
How to load the library path in the /etc/ld.so.conf.d/
?
如何加载库路径/etc/ld.so.conf.d/
?
Thanks a lot.
非常感谢。
采纳答案by Chris Jester-Young
Did you run ldconfig
(as root) lately? There's a shared library cache that's updated by that program, and if you updated a file in /etc/ld.so.conf.d
without running ldconfig
, the cache data could be out of date.
你ldconfig
最近运行(以 root 身份)吗?有一个由该程序更新的共享库缓存,如果您在/etc/ld.so.conf.d
没有运行ldconfig
的情况下更新了文件,则缓存数据可能已过时。