1

Why can shared libraries be located as one user, but not as another?

view story
linux-howto

http://stackoverflow.com – I have compiled a Qt application that needs to be run as another user. However, it is unable to load the Qt shared libraries when it is run as that user: ~/MyApp/src $ sudo -u otherUser ./MyApp ./MyApp: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory Doing an ldd as otherUser, we see the expected: ~/MyApp/src $ sudo -u otherUser ldd ./MyApp libQtGui.so.4 => not found However, when I do an ldd as myself, I can find the libQtGui.so.4 shared library just fine. ~/MyApp/src $ ldd ./MyApp libQtGui.so.4 => /usr/local/Trolltec (HowTos)