您的位置:首页 > 数据库 > MySQL

编译安装cmake2.8.8 mysql5.5.32

2017-09-22 23:34 274 查看
下面是我编译cmake的时候出现的N多问题,以及解决方法。报错[root@dataserver cmake-2.8.8]# ./configure ---------------------------------------------CMake 2.8.8, Copyright 2000-2011 Kitware, Inc.---------------------------------------------Error when bootstrapping CMake:Cannot find appropriate C compiler on this system.Please specify one using environment variable CC.See cmake_bootstrap.log for compilers attempted.

---------------------------------------------Log of errors: /root/tools/cmake-2.8.8/Bootstrap.cmk/cmake_bootstrap.log---------------------------------------------解决办法[root@dataserver cmake-2.8.8]# yum install -y gcc c++[root@dataserver cmake-2.8.8]# yum install gcc-c++

[root@dataserver cmake-2.8.8]#./configure
CMake has bootstrapped. Now run gmake.
[root@dataserver cmake-2.8.8]# gmake
[root@dataserver cmake-2.8.8]#gmake install
安装完毕 cmake2.8.8

编译安装mysql5.5.32

[root@dataserver tools]# tar zxf mysql5.5.32.tar.gz
[root@dataserver tools]# cd mysql-5.5.32
[root@dataserver mysql-5.5.32]# cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.32 \
-DMYSQL_DATADIR=/application/mysql-5.5.32/data \
-DMYSQL_UNIX_ADDR=/application/mysql-5.5.32/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITHOUT_PARTITION_STORAGE_ENGINE=1 \
-DWITH_FAST_MUTEXES=1 \
-DWITH_ZLIB=bundled \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_READLINE=1 \
-DWITH_EMBEDDED_SERVER=1 \
-DWITH_DEBUG=0

报错
-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:83 (MESSAGE):
Curses library not found. Please install appropriate package,

remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:118 (FIND_CURSES)
cmake/readline.cmake:214 (MYSQL_USE_BUNDLED_READLINE)
CMakeLists.txt:269 (MYSQL_CHECK_READLINE)

-- Configuring incomplete, errors occurred!
考虑到我是mini版安装的 很多依赖包没有安装!
解决办法

[root@dataserver mysql-5.5.32]# yum install ncurses-devel perl* libaio bison openssl-devel -y

还是报错

-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:83 (MESSAGE):
Curses library not found. Please install appropriate package,

remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:118 (FIND_CURSES)
cmake/readline.cmake:214 (MYSQL_USE_BUNDLED_READLINE)
CMakeLists.txt:269 (MYSQL_CHECK_READLINE)
解决办法
在 [root@dataserver mysql-5.5.32]# rm CMakeCache.txt 删除这个文件
之后编译就成功了。
[root@dataserver mysql-5.5.32]# make && make install

今天太晚了 到此结束,明天继续
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  cmake2.8.8