"Cannot Open Shared Object File" only present when run as cron

Hey folks, I'm currently using Boost to hold a statistical model in memory but am running into a problem. When run directly from the command line (as root), there are no issues, but when the same is run as a cron job, the following error is present... "/root/pylda/src/infer: error while loading shared libraries: libboost_program_options.so.1.46.1: cannot open shared object file: No such file or directory" Not quite sure what would change between running the same script as root user vs cron (I believe the cron is running as root, anyway). Have any of you experienced a similar problem? Thanks in advance, Russ Jones

Hi, you should probably use LD_LIBRARY_PATH to point the directory in which libboost_program_options.so.1.46.1 is placed, e.g.: --- $ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/boost/libs ./infer --- Alternatively, you could compile 'infer' with 'rpath' linker option (see man ld, search for 'rpath' option) to add a given directory (the one with boost libs) to runtime library search path of the output ELF file. WBR, Adam Romanek On 10/27/2011 04:48 PM, Russ Jones wrote:
Hey folks,
I'm currently using Boost to hold a statistical model in memory but am running into a problem. When run directly from the command line (as root), there are no issues, but when the same is run as a cron job, the following error is present...
"/root/pylda/src/infer: error while loading shared libraries: libboost_program_options.so.1.46.1: cannot open shared object file: No such file or directory"
Not quite sure what would change between running the same script as root user vs cron (I believe the cron is running as root, anyway). Have any of you experienced a similar problem?
Thanks in advance,
Russ Jones
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Adam Romanek
-
Russ Jones