Linux服务无法在/etc/ld.so.conf.d中加载库路径 [英] Linux service can't load library path in the /etc/ld.so.conf.d

查看:714
本文介绍了Linux服务无法在/etc/ld.so.conf.d中加载库路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux中有一项服务.

I have a service in Linux.

当我启动它时,请使用服务启动或在init.d中启动.无法加载已存储在/etc/ld.so.conf.d/中的配置.因此,该服务无法启动某些将库路径加载到/etc/ld.so.conf.d/.中的进程.

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.

但是当我在shell中运行此服务脚本时,它可以正常工作.

But when I run this service script in shell, it works fine.

如何在/etc/ld.so.conf.d/中加载库路径?

非常感谢.

推荐答案

您最近是否以根用户身份运行ldconfig?有一个由该程序更新的共享库缓存,如果您在/etc/ld.so.conf.d中更新文件而不运行ldconfig,则缓存数据可能已过期.

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.

这篇关于Linux服务无法在/etc/ld.so.conf.d中加载库路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆