mysql lib_explode_编译安装MySQL数据库错误解决

错误代码:

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++

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值