เพิ่ม library path in ubuntu 12.04

การ set library path ที่ terminal ขณะกำลังใช้งาน คือค่าที่ set จะหายไปเมื่อ reboot
$ export LD_LIBRARY_PATH=”/list/of/library/paths:/another/path”

การ set library path ให้กับ user เฉพาะคน คือค่านี้จะถูกเรียกทำงานเมื่อ boot เครื่องให้ set ค่านี้ไว้ที่ไฟล์ /home/user/.bashrc
$ export LD_LIBRARY_PATH=”/list/of/library/paths:/another/path”

การเพิ่ม library path ให้กับระบบ คือ boot ทุุกครั้งจะสามารถใช้งานได้ ให้ทำดังนี้

To add new library path, create new file in /etc/ld.so.conf.d folder and open it in your favorite editor
$ sudo gedit /etc/ld.so.conf.d/jacklib.conf
Add the path to file and save it
/path/to/new/lib
Run ‘ldconfig’ to update the necessary links and cache
$ sudo ldconfig
ที่มา:
https://www.linux.com/community/blogs/130-distributions/417386-to-add-new-library-path-in-ubuntu-1010
http://www.cyberciti.biz/faq/linux-setting-changing-library-path/