Shared Libraries in Same Folder with App in TCSH
-
08-07-2019 - |
Question
I am deploying a locally-compiled app to a remote Linux server. Since I don't have root account I cannot put needed shared libraries to /usr/lib Is there a way to overcome this? I put libraries in same folder and changed "path" variable but did not work.
Solution
Two simple options.
- You can set the
LD_LIBRARY_PATH
variable inside your script (see Section 3.3.1. of the shared libraries HOWTO). There are problems with this approach for production code, but if set in a wrapper script is probably ok. You can call your app with the libraries specified on the command line by invoking the
ld-linux
program loader directly, as described in the manpage and HOWTO:/lib/ld-linux.so.2 --library-path PATH EXECUTABLE
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow