mysql5.6 cmake 编译提示Library mysqlserver depends on OSLIBS -lpthread;m;rt;crypt;dl

时间:2015-09-08 07:05:35   收藏:0   阅读:1175


新安装的 RedHat 6.0 操作系统,为了节省时间,在安装时选择了 "最小化安装"

操作系统需要运行 mysql-5.6.11,在 cmake 编译时报如下错误:


-- OPENSSL_LIBRARY = OPENSSL_LIBRARY-NOTFOUND
-- CRYPTO_LIBRARY = CRYPTO_LIBRARY-NOTFOUND
-- Library mysqlclient depends on OSLIBS -lpthread;m;rt;dl

CMake Error: Problem with tar_close(): Success

CMake Error: Problem extracting tar: /opt/software/mysql-5.6.11/source_downloads/gmock-1.6.0.zip

Warning: Bison executable not found in PATH

-- Library mysqlserver depends on OSLIBS -lpthread;m;rt;crypt;dl

-- Configuring incomplete, errors occurred!


cmake 编译方法如下:

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/usr/loca/mysql/ \
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 \
-DWITH_SSL=yes  -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_READLINE=on


解决办法: mysql-5.5 以上版本需要依赖于如下包文件(如果是低于 mysql-5.5 版本不需要安装 cmake )

gcc gcc-c++ openssl openssl-devel ncurses ncurses-devel cmake


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!