分类: LINUX
2011-09-10 11:10:08
我遇到这个问题时,通过这边文章解决的,但是不是像上面说的那样,我是把所有顺序走完了才成功的:
1)先查看加载情况:
执行:ldd ./tdw
显示:
linux-gate.so.1 => (0xffffe000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7ee8000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7ed1000)
libmysqlclient.so.15 => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7ded000)
libm.so.6 => /lib/libm.so.6 (0xb7dc4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7db9000)
libc.so.6 => /lib/libc.so.6 (0xb7c78000)
/lib/ld-linux.so.2 (0xb7f12000)
2)可以看到是连接的,但是没有找到:下来确定libmysqlclient.so.15是存在的:
执行:locate libmysqlclient.so.15
显示:
locate: warning: database `/var/lib/locatedb' is more than 8 days old
/usr/local/mysql/lib/mysql/libmysqlclient.so.15
/usr/local/mysql/lib/mysql/libmysqlclient.so.15.0.0
/usr/local/software/mysql-5.0.45/libmysql/.libs/libmysqlclient.so.15
/usr/local/software/mysql-5.0.45/libmysql/.libs/libmysqlclient.so.15.0.0
2)通过第一步,确定是存在的,通过ldconfig注册ldconfig /usr/local/mysql/lib/mysql/libmysqlclient.so.15
ldconfig /usr/local/mysql/lib/mysql/libmysqlclient.so.15.0.0
但是这次还是没有成功
3) 只好在继续往下试:将lib目录添加到 /etc/ld.so.conf文件
4)然后执行
ldconfig
这下才OK的。
谢谢这位大牛的分享