mydumper 安装报错处理(3)

[root@localhost mydumper-0.6.2]# mydumper --help mydumper: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

解决办法:

[root@localhost mydumper-0.6.2]# ldd /usr/local/bin/mydumper
        linux-gate.so.1 =>  (0x00f91000)
        libmysqlclient.so.18 => not found
        libpthread.so.0 => /lib/libpthread.so.0 (0x006fc000)
        libm.so.6 => /lib/libm.so.6 (0x0072b000)
        librt.so.1 => /lib/librt.so.1 (0x00720000)
        libdl.so.2 => /lib/libdl.so.2 (0x00719000)
        libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00757000)
        libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x00918000)
        libpcre.so.0 => /lib/libpcre.so.0 (0x021a8000)
        libz.so.1 => /lib/libz.so.1 (0x002ea000)
        libc.so.6 => /lib/libc.so.6 (0x00564000)
        /lib/ld-linux.so.2 (0x0053e000)
[root@localhost mydumper-0.6.2]#  LD_DEBUG=libs /usr/local/bin/mydumper -v
      2707:    find library=libmysqlclient.so.18 [0]; searching
      2707:      search cache=/etc/ld.so.cache
      2707:      search path=/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/tls:/lib/i686/sse2:/lib/i686:/lib/sse2:/lib:/usr/lib/tls /i686/sse2:/usr/lib/tls/i686:/usr/lib/tls/sse2:/usr/lib/tls:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2:/usr/lib            (system s earch path)
      2707:      trying file=/lib/tls/i686/sse2/libmysqlclient.so.18
      2707:      trying file=/lib/tls/i686/libmysqlclient.so.18
      2707:      trying file=/lib/tls/sse2/libmysqlclient.so.18
      2707:      trying file=/lib/tls/libmysqlclient.so.18
      2707:      trying file=/lib/i686/sse2/libmysqlclient.so.18
      2707:      trying file=/lib/i686/libmysqlclient.so.18
      2707:      trying file=/lib/sse2/libmysqlclient.so.18
      2707:      trying file=/lib/libmysqlclient.so.18
      2707:      trying file=/usr/lib/tls/i686/sse2/libmysqlclient.so.18
      2707:      trying file=/usr/lib/tls/i686/libmysqlclient.so.18
      2707:      trying file=/usr/lib/tls/sse2/libmysqlclient.so.18
      2707:      trying file=/usr/lib/tls/libmysqlclient.so.18
      2707:      trying file=/usr/lib/i686/sse2/libmysqlclient.so.18
      2707:      trying file=/usr/lib/i686/libmysqlclient.so.18
      2707:      trying file=/usr/lib/sse2/libmysqlclient.so.18
      2707:      trying file=/usr/lib/libmysqlclient.so.18

没有找到 libmysqlclient.so.18

[root@localhost mydumper-0.6.2]# locate libmysqlclient.so.18 /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18 /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18.1.0 [root@localhost mydumper-0.6.2]# ll /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18 lrwxrwxrwx. 1 root mysql 24 Aug 13 14:18 /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18 -> libmysqlclient.so.18.1.0

然后将 /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18.1.0 复制到 /usr/lib/ 木下:

[root@localhost mydumper-0.6.2]# cp /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18.1.0 /usr/lib/libmysqlclient.so.18
[root@localhost mydumper-0.6.2]# ldd /usr/local/bin/mydumper                                                                                      linux-gate.so.1 =>  (0x00805000)
        libmysqlclient.so.18 => /usr/lib/libmysqlclient.so.18 (0x0019f000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x006fc000)
        libm.so.6 => /lib/libm.so.6 (0x0072b000)
        librt.so.1 => /lib/librt.so.1 (0x00720000)
        libdl.so.2 => /lib/libdl.so.2 (0x00719000)
        libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x0055e000)
        libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x00918000)
        libpcre.so.0 => /lib/libpcre.so.0 (0x021a8000)
        libz.so.1 => /lib/libz.so.1 (0x0067b000)
        libc.so.6 => /lib/libc.so.6 (0x0091d000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x07b14000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0068f000)
        /lib/ld-linux.so.2 (0x0053e000)

测试:

[root@localhost mydumper-0.6.2]# mydumper --help
Usage:
  mydumper [OPTION...] multi-threaded MySQL dumping

Help Options:
  -?, --help                  Show help options

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a690fcfa326094e1089d8c7c5b417cd9.html