Comment 15 for bug 366728

Revision history for this message
Hendy Irawan (ceefour) wrote :

It seems the proper way to "add to LD_LIBRARY_PATH" is not by using that env anymore, but by using ldconfig and /etc/ld.so.conf.d/*.conf files.

1. Add the ld.so configuration file :

echo "/opt/qt-mobility-src-1.0.0-tp2/install/lib" | sudo tee /etc/ld.so.conf.d/qt-mobility.conf

2. Update the cache

sudo ldconfig -v

Now the libraries are in your ld library path.

No messing with /etc/environment. And if you later decide to "uninstall" the libraries, just remove the conf file and run sudo ldconfig again. Cleaner solution for me.

I just wonder if this is also portable to other distros beside Ubuntu? (since LD_LIBRARY_PATH supposedly works on all Linux distros)

See http://linux.derkeiler.com/Mailing-Lists/Ubuntu/2008-02/msg02742.html for rationale.

"AFAIK LD_LIBRARY_PATH is unset in ubuntu, since the libraries are all
where they should be:)"