萬盛學電腦網

 萬盛學電腦網 >> Linux教程 >> Linux下mydumper報錯libmysqlclient_16 not defined怎麼辦?

Linux下mydumper報錯libmysqlclient_16 not defined怎麼辦?

  Linux系統下進行多線程的導入導出時,多少會接觸到mydumper工具,最近有用戶反映,在使用mydumper的時候,出現了libmysqlclient_16 not defined報錯提示,對此應該如何解決呢?

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

  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壓縮功能就沒問題了。

  上面就是Linux系統mydumper報錯libmysqlclient_16 not defined的方法介紹了,出現該問題可能是目錄下文件丟失,可重新引入。

copyright © 萬盛學電腦網 all rights reserved