Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux service can't load library path in the /etc/ld.so.conf.d

I have a service in 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.

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

How to load the library path in the /etc/ld.so.conf.d/?

Thanks a lot.

like image 230
JinruiDu Avatar asked Aug 20 '13 02:08

JinruiDu


People also ask

What is Ld so Conf D?

ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld. so.

What is Ldconfig in Linux?

ldconfig is a utility that indexes shared object names to simplify loading on shared object libraries by executables. It scans standard directories and those found in the ld. so. conf configuration file and stores its index in ld.

What is Ld_run_path?

LD_RUN_PATH. Specifies the directories that are to be searched for libraries at both link and run time.


1 Answers

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.

like image 176
Chris Jester-Young Avatar answered Oct 01 '22 16:10

Chris Jester-Young