mydumper 安装报错处理
mydumper 官网:https://launchpad.net/mydumper
下载之后,安装报错:
[root@localhost local]# cd mydumper-0.6.2
[root@localhost mydumper-0.6.]#
[root@localhost mydumper-0.6.]# ls
binlog.c CMakeCache.txt common.h docs g_unix_signal.h myloader.c Processing server_detect.c
binlog.h CMakeFiles config.h Finished mydumper.c myloader.h README server_detect.h
cmake CMakeLists.txt config.h.in g_unix_signal.c mydumper.h Package Running
[root@localhost mydumper-0.6.]# cmake .
-- The CXX compiler identification is GNU 4.4.
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using mysql-config: /usr/local/mysql/bin/mysql_config
-- Found MySQL: /usr/local/mysql/include, /usr/local/mysql/lib/libmysqlclient.so;/usr/lib/libpthread.so;/usr/lib/libm.so;/usr/lib/librt.so;/usr/lib/libdl.so
-- checking for one of the modules 'glib-2.0'
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake: (message):
None of the required 'glib-2.0' found
Call Stack (most recent call first):
cmake/modules/FindGLIB2.cmake: (pkg_search_module)
CMakeLists.txt: (find_package) -- checking for one of the modules 'gthread-2.0'
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake: (message):
None of the required 'gthread-2.0' found
Call Stack (most recent call first):
cmake/modules/FindGLIB2.cmake: (pkg_search_module)
CMakeLists.txt: (find_package) CMake Warning at docs/CMakeLists.txt: (message):
Unable to find Sphinx documentation generator -- ------------------------------------------------
-- MYSQL_CONFIG = /usr/local/mysql/bin/mysql_config
-- CMAKE_INSTALL_PREFIX = /usr/local
-- BUILD_DOCS = ON
-- WITH_BINLOG = OFF
-- RUN_CPPCHECK = OFF
-- Change a values with: cmake -D<Variable>=<Value>
-- ------------------------------------------------
--
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLIB2_LIBRARIES (ADVANCED)
linked by target "mydumper" in directory /usr/local/mydumper-0.6.
linked by target "myloader" in directory /usr/local/mydumper-0.6.
GTHREAD2_LIBRARIES (ADVANCED)
linked by target "mydumper" in directory /usr/local/mydumper-0.6.
linked by target "myloader" in directory /usr/local/mydumper-0.6. -- Configuring incomplete, errors occurred!
See also "/usr/local/mydumper-0.6.2/CMakeFiles/CMakeOutput.log".
See also "/usr/local/mydumper-0.6.2/CMakeFiles/CMakeError.log".
cmake . 报错:
None of the required 'glib-2.0' found
None of the required 'gthread-2.0' found
网上搜索,没有找到解决办法,于是只好去官网寻找方法:
https://answers.launchpad.net/mydumper/+faq/349
Run:
cmake .
make One needs to install development versions of required libaries (MySQL, GLib, ZLib, PCRE):
NOTE: you must use the correspondent mysql devel package. * Ubuntu or Debian: apt-get install libglib2.-dev libmysqlclient15-dev zlib1g-dev libpcre3-dev libssl-dev
* Fedora, RedHat and CentOS: yum install glib2-devel mysql-devel zlib-devel pcre-devel openssl-devel
* openSUSE: zypper install glib2-devel libmysqlclient-devel pcre-devel zlib-devel
* MacOSX: port install glib2 mysql5 pcre pkgconfig cmake
(You may want to run 'port select mysql mysql5' afterwards) One has to make sure, that pkg-config, mysql_config, pcre-config are all in $PATH Binlog dump is disabled by default to compile with it you need to add -DWITH_BINLOG=ON to cmake options Obviously you need compiler and make packages too :)
可以看到需要安装依赖:
Fedora, RedHat and CentOS: yum install glib2-devel mysql-devel zlib-devel pcre-devel openssl-devel
于是按照说明进行安装:
[root@localhost mydumper-0.6.]# yum install glib2-devel mysql-devel zlib-devel pcre-devel openssl-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* c6-media:
Package mysql-devel-5.1.-.el6_5.i686 already installed and latest version
Package zlib-devel-1.2.-.el6.i686 already installed and latest version
Package pcre-devel-7.8-.el6.i686 already installed and latest version
Package openssl-devel-1.0.1e-30.el6.i686 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package glib2-devel.i686 :2.28.-.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ==========================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================
Installing:
glib2-devel i686 2.28.-.el6 c6-media k Transaction Summary
==========================================================================================================================================
Install Package(s) Total download size: k
Installed size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : glib2-devel-2.28.-.el6.i686 /
Unable to connect to dbus
Verifying : glib2-devel-2.28.-.el6.i686 / Installed:
glib2-devel.i686 :2.28.-.el6 Complete!
再来编译安装 mydumper:
[root@localhost mydumper-0.6.]# cmake .
-- Using mysql-config: /usr/local/mysql/bin/mysql_config
-- Found MySQL: /usr/local/mysql/include, /usr/local/mysql/lib/libmysqlclient.so;/usr/lib/libpthread.so;/usr/lib/libm.so;/usr/lib/librt.so;/usr/lib/libdl.so
-- checking for one of the modules 'glib-2.0'
-- checking for one of the modules 'gthread-2.0' CMake Warning at docs/CMakeLists.txt: (message):
Unable to find Sphinx documentation generator -- ------------------------------------------------
-- MYSQL_CONFIG = /usr/local/mysql/bin/mysql_config
-- CMAKE_INSTALL_PREFIX = /usr/local
-- BUILD_DOCS = ON
-- WITH_BINLOG = OFF
-- RUN_CPPCHECK = OFF
-- Change a values with: cmake -D<Variable>=<Value>
-- ------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/mydumper-0.6.
[root@localhost mydumper-0.6.]# echo $? [root@localhost mydumper-0.6.]# make
Scanning dependencies of target mydumper
[ %] Building C object CMakeFiles/mydumper.dir/mydumper.c.o
[ %] Building C object CMakeFiles/mydumper.dir/server_detect.c.o
[ %] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o
Linking C executable mydumper
[ %] Built target mydumper
Scanning dependencies of target myloader
[%] Building C object CMakeFiles/myloader.dir/myloader.c.o
Linking C executable myloader
[%] Built target myloader
[root@localhost mydumper-0.6.]# make install
[ %] Built target mydumper
[%] Built target myloader
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/mydumper
-- Removed runtime path from "/usr/local/bin/mydumper"
-- Installing: /usr/local/bin/myloader
-- Removed runtime path from "/usr/local/bin/myloader"
安装成功。但是执行时又报错:
[root@localhost mydumper-0.6.]# mydumper --help
mydumper: error while loading shared libraries: libmysqlclient.so.: cannot open shared object file: No such file or directory
解决办法:
[root@localhost mydumper-0.6.]# ldd /usr/local/bin/mydumper
linux-gate.so. => (0x00f91000)
libmysqlclient.so. => not found
libpthread.so. => /lib/libpthread.so. (0x006fc000)
libm.so. => /lib/libm.so. (0x0072b000)
librt.so. => /lib/librt.so. (0x00720000)
libdl.so. => /lib/libdl.so. (0x00719000)
libglib-2.0.so. => /lib/libglib-2.0.so. (0x00757000)
libgthread-2.0.so. => /lib/libgthread-2.0.so. (0x00918000)
libpcre.so. => /lib/libpcre.so. (0x021a8000)
libz.so. => /lib/libz.so. (0x002ea000)
libc.so. => /lib/libc.so. (0x00564000)
/lib/ld-linux.so. (0x0053e000)
[root@localhost mydumper-0.6.]# LD_DEBUG=libs /usr/local/bin/mydumper -v
: find library=libmysqlclient.so. []; searching
: search cache=/etc/ld.so.cache
: 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)
: trying file=/lib/tls/i686/sse2/libmysqlclient.so.
: trying file=/lib/tls/i686/libmysqlclient.so.
: trying file=/lib/tls/sse2/libmysqlclient.so.
: trying file=/lib/tls/libmysqlclient.so.
: trying file=/lib/i686/sse2/libmysqlclient.so.
: trying file=/lib/i686/libmysqlclient.so.
: trying file=/lib/sse2/libmysqlclient.so.
: trying file=/lib/libmysqlclient.so.
: trying file=/usr/lib/tls/i686/sse2/libmysqlclient.so.
: trying file=/usr/lib/tls/i686/libmysqlclient.so.
: trying file=/usr/lib/tls/sse2/libmysqlclient.so.
: trying file=/usr/lib/tls/libmysqlclient.so.
: trying file=/usr/lib/i686/sse2/libmysqlclient.so.
: trying file=/usr/lib/i686/libmysqlclient.so.
: trying file=/usr/lib/sse2/libmysqlclient.so.
: trying file=/usr/lib/libmysqlclient.so.
没有找到 libmysqlclient.so.
[root@localhost mydumper-0.6.]# locate libmysqlclient.so.18
/usr/local/mysql-5.6.-linux-glibc2.-i686/lib/libmysqlclient.so.
/usr/local/mysql-5.6.-linux-glibc2.-i686/lib/libmysqlclient.so.18.1.
[root@localhost mydumper-0.6.]# ll /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18
lrwxrwxrwx. root mysql Aug : /usr/local/mysql-5.6.-linux-glibc2.-i686/lib/libmysqlclient.so. -> libmysqlclient.so.18.1.
然后将 /usr/local/mysql-5.6.26-linux-glibc2.5-i686/lib/libmysqlclient.so.18.1. 复制到 /usr/lib/ 木下:
[root@localhost mydumper-0.6.]# 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.]# ldd /usr/local/bin/mydumper linux-gate.so.1 => (0x00805000)
libmysqlclient.so. => /usr/lib/libmysqlclient.so. (0x0019f000)
libpthread.so. => /lib/libpthread.so. (0x006fc000)
libm.so. => /lib/libm.so. (0x0072b000)
librt.so. => /lib/librt.so. (0x00720000)
libdl.so. => /lib/libdl.so. (0x00719000)
libglib-2.0.so. => /lib/libglib-2.0.so. (0x0055e000)
libgthread-2.0.so. => /lib/libgthread-2.0.so. (0x00918000)
libpcre.so. => /lib/libpcre.so. (0x021a8000)
libz.so. => /lib/libz.so. (0x0067b000)
libc.so. => /lib/libc.so. (0x0091d000)
libstdc++.so. => /usr/lib/libstdc++.so. (0x07b14000)
libgcc_s.so. => /lib/libgcc_s.so. (0x0068f000)
/lib/ld-linux.so. (0x0053e000)
测试:
[root@localhost mydumper-0.6.]# mydumper --help
Usage:
mydumper [OPTION...] multi-threaded MySQL dumping Help Options:
-?, --help Show help options Application Options:
-B, --database Database to dump
-T, --tables-list Comma delimited table list to dump (does not exclude regex option)
-o, --outputdir Directory to output files to
-s, --statement-size Attempted size of INSERT statement in bytes, default
-r, --rows Try to split tables into chunks of this many rows. This option turns off --chunk-filesize
-F, --chunk-filesize Split tables into chunks of this output file size. This value is in MB
-c, --compress Compress output files
-e, --build-empty-files Build dump files even if no data available from table
-x, --regex Regular expression for 'db.table' matching
-i, --ignore-engines Comma delimited list of storage engines to ignore
-m, --no-schemas Do not dump table schemas with the data
-k, --no-locks Do not execute the temporary shared read lock. WARNING: This will cause inconsistent backups
--less-locking Minimize locking time on InnoDB tables.
-l, --long-query-guard Set long query timer in seconds, default
-K, --kill-long-queries Kill long running queries (instead of aborting)
-D, --daemon Enable daemon mode
-I, --snapshot-interval Interval between each dump snapshot (in minutes), requires --daemon, default
-L, --logfile Log file name to use, by default stdout is used
--tz-utc SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones, defaults to on use --skip-tz-utc to disable.
--skip-tz-utc
--use-savepoints Use savepoints to reduce metadata locking issues, needs SUPER privilege
--success-on- Not increment error count and Warning instead of Critical in case of table doesn't exist
--lock-all-tables Use LOCK TABLE for all, instead of FTWRL
-h, --host The host to connect to
-u, --user Username with privileges to run the dump
-p, --password User password
-P, --port TCP/IP port to connect to
-S, --socket UNIX domain socket file to use for connection
-t, --threads Number of threads to use, default 4
-C, --compress-protocol Use compression on the MySQL connection
-V, --version Show the program version and exit
-v, --verbose Verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2
搞定。
启发:解决问题的最好方法是到官网查看文档和说明。
mydumper 安装报错处理的更多相关文章
- MSSQL 2012安装报错之0x858C001B
之前安装 Microsoft Sql Server 2012 R2 的时候总是报这样的错误: SQL Server Setup has encountered the following error: ...
- linux -小记(2)问题:yum 安装报错"Another app is currently holding the yum lock; waiting for it to exit... ...: yum Memory : 26 M RSS (868 MB VSZ) Started: Wed Oct 26 22:48:24 2016 - 0"
yum 安装报错 "Another app is currently holding the yum lock; waiting for it to exit... The other ap ...
- office2010安装报错
有没有童鞋,在第一次安装office 2010的时候,中途不管是何原因导致中断或者未安装成功的 然后从第二次开始就一直安装报错??? 哈哈,我最近就遇到了 其他很简单,网上有很多方法,也有很多步骤,包 ...
- yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between
yum安装报错有冲突file /usr/lib64/php/modules/fileinfo.so conflicts between attempted installs of php-pecl-f ...
- 关于eclipse(64位)下aptana插件安装报错问题解决
最近一直没有写过js,换了新电脑以后,eclipse下的aptana插件也没有装过,这几天要写js想重新把aptana装上,但是不知怎的,link方式.在线安装方式还有离线包下载下来利用eclipse ...
- 使用pip安装报错的处理方法
在新的机子上使用pip安装程序一直报错: Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connect ...
- Python——pip安装报错:is not a supported wheel on this platform
pip安装报错:is not a supported wheel on this platform 可能的原因1:安装的不是对应python版本的库,下载的库名中cp35代表python3.5,其它同 ...
- Scrapy安装报错
python3 pip 安装Scrapy在win10 安装报错error: Microsoft Visual C++ 14.0 is required. Get it with "Micro ...
- Maven的安装、配置及使用入门+maven安装报错:JAVA_HOME【申明:来源于网络】
Maven的安装.配置及使用入门+maven安装报错:JAVA_HOME[申明:来源于网络] Maven的安装.配置及使用入门:http://www.cnblogs.com/dcba1112/arch ...
随机推荐
- 基于TCP和多线程实现无线鼠标键盘-InputMethodManager
为了实现无线键盘的功能,使用了InputMethodManager弹出软键盘. // 弹出软键盘 public void pop_keyboard(){ imm = (InputMethodManag ...
- 解决 WinXP下 libcurl.dll 无法定位程序输入点GetTickCount64问题
1. 问题描述 用 IDA 打开libcurl.dll 可以在导入表看到对 GetTickCount64的引用,在 xp 的kernel32.dll中没有 GetTickCount64, 所以会出现 ...
- mysql autocommit=OFF导致wordpress 建立数据库连接时出错
今天安装wordpress完成后跳转到login页面时,出现建立数据库连接时出错.网上清一色的拷贝http://mt.sohu.com/20160917/n468547634.shtml的答案. 只能 ...
- IOS 非常流畅的滑动tableView
为什么要写这篇文章呢?之前写过一篇,因为手机打字不是很方便,还有之前同事用6splus 定下午茶时候,我滑动列表时候竟然误以为是安卓系统的手机. tableview 流畅度可以用fps来测试,到6 ...
- C语言之字符串处理函数
C语言中字符串处理函数介绍 下面介绍8种基本的常用的字符串处理函数,在数值数组中也常常用到(部分函数).所有的C语言编译系统中一般都提供这些函数. 1.puts函数——输出字符串的函数 一般的形式为p ...
- Xslider演示8种滚动效果
Xslider演示8种滚动效果包括: 一.左右切换:每次移动固定距离 二.左右切换:最后一个显示在最右侧 三.自动切换 四.循环切换 五.文本的上下滚动 六.上下切换 七.上下自动循环切换 在线预览 ...
- zDialog 可拖拽弹出层
zDialog弹出框: 代替window.open.window.alert.window.confirm:提供良好的用户体验: 水晶质感,设计细腻,外观漂亮: 兼容ie6/7/8.firefox2/ ...
- bootstrap深入理解之格子布局
一.源码文件: _grid.scss:格子系统类文件 Mixins/_grid.scss:支持格子系统实现的mixin集合 Mixins/_grid-framework.scss:格子系统实现的核心m ...
- [deviceone开发]-do_Viewshower的动画效果示例
一.简介 do_Viewshower组件也支持View之间的过场动画,支持大概12种,这个示例随机的切换12种动画中的一种,而且每次切换的动画时间不一样.直观的展示12种动画的效果.适合初学者. 二. ...
- CSS的盒子模型
1.边框:包裹内容的容器 统一设置:border: border-width border-style border-color 上:border-top 下:border-bottom 左:bord ...