时间:2021-07-01 10:21:17 帮助过:14人阅读
---------------------------------------------
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
不报错就安装完毕了
创建软连接(这一步相当于windows创建快捷方式)
[root@dataserver mysql-5.5.32]# cd /application/
[root@dataserver application]# ll
总用量 4
drwxr-xr-x. 13 root root 4096 9月 23 07:54 mysql-5.5.32
[root@dataserver application]# ln -s mysql-5.5.32/ mysql
[root@dataserver application]# ll
总用量 4
lrwxrwxrwx. 1 root root 13 9月 23 07:55 mysql -> mysql-5.5.32/
drwxr-xr-x. 13 root root 4096 9月 23 07:54 mysql-5.5.32
到此安装完毕,具体请看下一篇,初始化数据库相关
本文出自 “董利强” 博客,请务必保留此出处http://6207422.blog.51cto.com/6197422/1967937
编译安装cmake2.8.8 mysql5.5.32
标签:cmake2.8.8