在我安装mydumper之前,我的服务器正在使用mysqld 5.6运行
我从下载我的垃圾桶
https://launchpad.net/mydumper/0.6/0.6.2/+download/mydumper-0.6.2.tar.gz
我安装mydumper需要的所有依赖项:

yum install cmake pcre-devel glib2-devel zlib-devel gcc gcc-c++ mysql-devel openssl-devel

当我运行cmake时。我看到一些错误:
-- Using mysql-config: /usr/bin/mysql_config
-- MySQL not found.

CMake Warning at docs/CMakeLists.txt:9 (message):
  Unable to find Sphinx documentation generator


-- ------------------------------------------------
-- MYSQL_CONFIG = /usr/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:
MYSQL_LIBRARIES_dl
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_m
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_mysqlclient
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_pthread
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_rt
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2

-- Configuring incomplete, errors occurred!
See also "/root/mydumper-0.6.2/CMakeFiles/CMakeOutput.log".
See also "/root/mydumper-0.6.2/CMakeFiles/CMakeError.log".

我还阅读了mydumper-0.6.2/cmake/modules/FindMySQL.cmake,然后进行了一些修改:
我在find_library函数中添加了/usr/lib64/mysql,但它没有使用。
没有任何限制,我必须使用我的转储程序。只是我不太好奇,想试试。
如何解决cmake的这个问题?
谢谢你抽出时间!

最佳答案

试着删除解压后的mydumper目录,然后再次解压“mydumper-0.6.2.tar.gz”,然后cmake,你会发现它工作得很好。
这是我的手术:

rm -rf mydumper-0.6.2
tar -zxvf mydumper-0.6.2.tar.gz
cd mydumper-0.6.2
cmake .
make
make install

祝你好运!

08-26 23:01