cannot open shared object file: No such file or directory

./move_db: error while loading shared libraries: libmysqlclient.so.15: cannot
open shared object file: No such file or directory

第一步:确认有哪些Lib无法Load
>ldd move_db
linux-gate.so.1 => (0x0089c000)
libmysqlclient.so.15 => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00cfa000)
libm.so.6 => /lib/libm.so.6 (0x00804000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x009f8000)
libc.so.6 => /lib/libc.so.6 (0x0069e000)
/lib/ld-linux.so.2 (0x0067b000)


第二步:系统要确认动态库的地址,把动态库的路径放到/etc/ld.so.conf中
建议:在/etc/ld.so.conf.d/上新建动态库相应的文件配置文件*.conf,
在该文件中填上该动态库的绝对路径
此例:
vim /etc/ld.so.conf.d/ld.mysql.so.conf
/usr/local/mysql/lib


第三步:运行ldconfig重建/etc/ld.so.cache

你可能感兴趣的:(Directory)