What is the best place to set up application specific LD_LIBRARY_PATH
variable on Solaris?
How does
LD_LIBRARY_PATH
variable work?
We currently set it up in .kshrc
, but different applications need different versions of messaging framework, but these applications run under the same use and hence they would need different LD_LIBRARY_PATH
, so in your opinion what is the best place to set this variable?
Basically I am trying to figure out how to make this variable path part of the application instead of user environment specific.
In your terminal, type the following sudo ldconfig and press enter on your keyboard. Close all your open terminals that you were using then open a new terminal session and run echo $LD_LIBRARY_PATH If you see the path you added is echoed back, you did it right.
LD_LIBRARY_PATH is an environmental variable used in Linux/UNIX Systems. It is used to tell dynamic link loaders where to look for shared libraries for specific applications. It is useful until you don't mess with it. It's better to avoid the use of LD_LIBRARY_PATH and use alternatives.
Set the LD_LIBRARY_PATH to include the directories that contain the JVM libraries in addition to the directories that contain your own libraries.
2 LD_LIBRARY_PATH Environment Variable. Use the LD_LIBRARY_PATH environment variable to specify directory paths that the linker should search for libraries specified with the -l library option. Multiple directories can be specified, separated by a colon.
Usually I would just have a shell script that starts the application. In the shell script I would set LD_LIBRARY_PATH to whatever I need it to be for that app, then have the script start that app. Doing it that way should cause the path to be set only for that application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With