错误代码:
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:
OPENSSL_INCLUDE_DIR
used as include directory
in directory /root/mysql-5.6.25/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of
cmake failed
-- Check size of wchar_t - failed
-- Check size of wctype_t
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:
OPENSSL_INCLUDE_DIR
used as include directory
in directory /root/mysql-5.6.25/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of
cmake failed
-- Check size of wctype_t - failed
-- Check size of wint_t
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:
OPENSSL_INCLUDE_DIR
used as include directory
in directory /root/mysql-5.6.25/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of
cmake failed
-- Check size of wint_t - failed
-- Could NOT find Curses (missing:
CURSES_LIBRARY
CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:85 (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:128
(FIND_CURSES)
cmake/readline.cmake:202
(MYSQL_USE_BUNDLED_EDITLINE)
CMakeLists.txt:409
(MYSQL_CHECK_EDITLINE)
-- Configuring incomplete,
errors occurred!
解决方式:这段提示是说你配置时指定的用户在系统中没有找到,我们把配置时指定的用户建立出来即可,我这里的配置参数如下:
[root@localhost mysql-5.6.25]#
/usr/local/cmake/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DSYSCONFDIR=/etc -DMYSQL_DATADIR=/usr/local/mysql/data -DMYSQL_TCP_PORT=3306
-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DMYSQL_USER=mysql
-DEXTRA_CHARSETS=all
-DWITH_READLINE=1 -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1
-DENABLED_LOCAL_INFILE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
从以上配置信息中可以看到我设置让MySQL运行的用户是mysql,所以我们添加一个mysql的用户
[root@localhost ~]# useradd -s /sbin/nologin
mysql
从以上错误信息中可以看到缺少openssl库文件
[root@localhost mysql-5.6.25]# yum -y install openssl
openssl-devel
从以上错误信息中可以看到缺少ncurses库文件
[root@localhost mysql-5.6.25]# yum -y install ncurses-devel
添加完成后删除cmake记录文件
[root@localhost mysql-5.6.25]# rm -rf
CMakeCache.txt
然后继续编译
错误代码2:
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.
解决方式:
[root@localhost cmake-2.8.10.2]# yum -y install gcc
错误代码3:
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
解决方式:
[root@localhost cmake-2.8.10.2]# yum -y install gcc-c++