PDA

View Full Version : LD_LIBRARY_PATH problem



sincnarf
14th October 2007, 02:30
Hello

Anyone here knows how to auto-export LD_LIBRARY_PATH on pc boot? Also why LD_LIBRARY_PATH suddenly disappear from my export list after a few hours?

marcel
14th October 2007, 09:14
What shell are you using?
For bash, the user startup script is ~/.bash_profile (or ~/.bashrc ).
You can add there the export and it will be set when you log in.

You also have to check /etc/passwd and make sure your user's default shell is bash.

For other shells, just search the internet.


Also why LD_LIBRARY_PATH suddenly disappear from my export list after a few hours?
There must be some voodoo involved :).
Really, I think you run some application that just changes the variable. This shouldn't happen, it should append paths to the var not override it.

wysota
14th October 2007, 10:03
If you want it system-wide, you can add a file containing the path to /etc/ld.so.conf.d/ or modify /etc/ld.so.conf directly depending on your system. Then run ldconfig (as root) and you're done - you won't need LD_LIBRARY_PATH.

abbaasi69
29th August 2020, 18:58
You can open terminal and export the LD_LIBRARY_PATH just before running it as follows:

export LD_LIBRARY_PATH
exec "./my_app"