编译安装mariadb时出错:/usr/bin/c++ doesn't support -std=c++11 or -std=c++0x

1、错误描述:

[root@centos7 ~]#cmake . \
> -DCMAKE_INSTALL_PREFIX=/app/mysql \
> -DMYSQL_DATADIR=/data/mysqldb/ \
> -DSYSCONFDIR=/etc \
> -DMYSQL_USER=mysql \
> -DWITH_INNOBASE_STORAGE_ENGINE=1 \
> -DWITH_ARCHIVE_STORAGE_ENGINE=1 \
> -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
> -DWITH_PARTITION_STORAGE_ENGINE=1 \
> -DWITHOUT_MROONGA_STORAGE_ENGINE=1 \
> -DWITH_DEBUG=0 \
> -DWITH_READLINE=1 \
> -DWITH_SSL=system \
> -DWITH_ZLIB=system \
> -DWITH_LIBWRAP=0 \
> -DENABLED_LOCAL_INFILE=1 \
> -DMYSQL_UNIX_ADDR=/app/mysql/mysql.sock \
> -DDEFAULT_CHARSET=utf8 \
> -DDEFAULT_COLLATION=utf8_general_ci
......
CMake Error at storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake:180 (message):
  /usr/bin/c++ doesn't support -std=c++11 or -std=c++0x, you need one that does.
Call Stack (most recent call first):
  storage/tokudb/PerconaFT/CMakeLists.txt:35 (include)

-- Configuring incomplete, errors occurred!
See also "/server/src/mariadb-10.1.11/CMakeFiles/CMakeOutput.log".
See also "/server/src/mariadb-10.1.11/CMakeFiles/CMakeError.log".

2、错误原因:编译mariadb时,tokuDB引擎需要支持c++11的编译器

3、解决方法:
  1>如果确实想用tokuDB引擎,就需要编译一个高版本的gcc;
  2>如果不需要tokuDB引擎,在编译参数中加上"-DPLUGIN_TOKUDB=NO"选项即可。

posted @ 2020-05-03 20:31  我听过  阅读(665)  评论(0编辑  收藏  举报