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?
Printable View
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?
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.
There must be some voodoo involved :).Quote:
Also why LD_LIBRARY_PATH suddenly disappear from my export list after a few hours?
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.
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.
You can open terminal and export the LD_LIBRARY_PATH just before running it as follows:
export LD_LIBRARY_PATH
exec "./my_app"