Resolve missing libraries(cannot open shared object file)

When you install an application that come from somewhere than a repository, this kind of error may occur :

./opera-mobile-emulator-launcher: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory

Solution

First, you can easily check the required dependencies for an executable application with the ldd command.

Example : ldd /usr/share/OperaMobile/opera-mobile-emulator
By executing this command, you should get something like this :
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf57cc000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf57c7000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf57a9000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf578e000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf5617000)
libQtCore.so.4 => not present

Warning : the next section only works for Debian and its derivatives

Then you just have to look up these missing libraries (the one with the not presenttag with dpkg -S and then install them with apt or something.

Leave a Reply

Your email address will not be published. Required fields are marked *