开发者

program cannot find libQt3Support.so.4 even though I have it in ~/lib

I installed Qt4 in my local home in a Ubuntu system and the Qt4 libraries are in ~/lib. I have another program (hawkeye for genome assembly) dependent on Qt4 however when I run that it gives the error message:

error while loading share libraries: libQt3Support.so.4: cannot open shared object file: No such file or directory

I checked ~/lib and all th开发者_运维百科e Qt libs are there. Do I need to add the path ~/lib to anywhere?


A good way to debug problems like this is to take a look at the ldd output. For example:

$ ldd yourProg
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7e3d000)
libQtGui.so => /usr/lib/libQtGui.so.4.7.0 (0xb7f7f000)
libQt3Support.so => (not found)
...

The above output will tell you if it's picking up your copy of Qt or the system version. Then you can set LD_LIBRARY_PATH or edit ld.so.conf and rerun ldconfig. For example:

$ export LD_LIBRARY_PATH=/path/to/your/qt
$ ldd yourProg

Or (as root):

# echo "/path/to/your/qt" >> /etc/ld.so.conf
# ldconfig
$ ldd yourProg
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜