下面来给各位介绍一下linux中mydumper出现libmysqlclient_16 not defined解决办法,希望例子能帮助到各位同学.
昨天在测试mydumper压缩功能(-c)时,出现如下错误:
[root@liufofu backup]# mydumper -h localhost -u root -p tiger -c -o ./liufofu/ -B liufofu
mydumper: relocation error: mydumper: symbol gzopen, version libmysqlclient_16 not defined in file libmysqlclient_r.so.16 with link time reference
定位了下libmysqlclient_16.so在mysql安装目录的lib下有啊,怎么还报错,代码如下:
- [root@liufofu backup]# ls /usr/local/mysql/lib/
- libdbug.a libmyisam.a libmysqlclient.la libmysqlclient_r.so
- libmysqlclient.so libmysqld.a libvio.a plugin
- libheap.a libmyisammrg.a libmysqlclient_r.a libmysqlclient_r.so.16
- libmysqlclient.so.16 libmystrings.a libz.a
- libmygcc.a libmysqlclient.a libmysqlclient_r.la libmysqlclient_r.so.16.0.0 --Vevb.com
- libmysqlclient.so.16.0.0 libmysys.a libz.la
查了下资料应该是系统没有引用这个目录,可以定义下环境变量LD_LIBRARY_PATH,加入/usr/local/mysql/lib这个目录,命令如下.
export LD_LIBRARY_PATH="/usr/local/mysql/lib:$LD_LIBRARY_PATH"
再次执行mydumper压缩功能就没问题了.
新闻热点
疑难解答