I install custom software in /usr/local/lib. How do I set the PATH and LD_LIBRARY_PATH in CentOS 6 system-wide to use /usr/local/lib. I realize there may be more than one way. What's the simplest and most standard way?
Asked
Active
Viewed 9.1k times
2 Answers
97
You can edit the file /etc/ld.so.conf and add your path /usr/local/lib to it
or create a new file in /etc/ld.so.conf.d/ like /etc/ld.so.conf.d/usrlocal.conf
and put only the following line in it
/usr/local/lib
Then run ldconfig -v as root, and you're done.
BitGen01100000
- 177
Olivier S
- 2,769
- 2
- 16
- 14
12
You can add it in /etc/bashrc, say, at the end.
export PATH=$PATH:/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
cjc
- 25,492