千家信息网

MariaDB 10.1源码安装报错"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""怎么办

发表于:2026-11-04 作者:千家信息网编辑
千家信息网最后更新 2026年11月04日,这篇文章给大家分享的是有关MariaDB 10.1源码安装报错"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""怎么办的内容。小编觉得挺实用的,因此分享
千家信息网最后更新 2026年11月04日MariaDB 10.1源码安装报错"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""怎么办

这篇文章给大家分享的是有关MariaDB 10.1源码安装报错"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""怎么办的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

--MariaDB 10.1源码安装报错
[root@localhost install]# cd mariadb-10.1.14
[root@localhost mariadb-10.1.14]# cmake . -DCMAKE_INSTALL_PREFIX=/maria -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=ON -DWITH_XTRADB_STORAGE_ENGINE=1 -
DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATEDX_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DCOMPILATION_COMMENT='MariaDB 10.1 production environment' -DWITH_READLINE=ON -DSYSCONFDIR=/maria_data/cnf -DMYSQL_UNIX_ADDR=/maria_data/maria.sock -DMYSQL_DATADIR=/maria_data
.....
-- Looking for libstemmer.h - not found
-- Looking for sb_stemmer_list in stemmer
-- Looking for sb_stemmer_list in stemmer - not found
-- checking for module 'libzmq'
-- package 'libzmq' not found
-- Looking for event_init in event
-- Looking for event_init in event - not found
-- checking for module 'msgpack'
-- package 'msgpack' not found
-- Looking for msgpack_version in msgpack
-- Looking for msgpack_version in msgpack - not found
-- Performing Test HAVE_C__Wno_write_strings
-- Performing Test HAVE_C__Wno_write_strings - Success
-- Performing Test HAVE_CXX__Wno_write_strings
-- Performing Test HAVE_CXX__Wno_write_strings - Success
-- Configuring OQGraph
-- Could NOT find Boost
-- Boost not found. OQGraph will not be compiled
-- Requisites for OQGraph not met. OQGraph will not be compiled
-- Looking for FascistCheckUser in crack
-- Looking for FascistCheckUser in crack - not found
-- Looking for include files HAVE_CRACK_H
-- Looking for include files HAVE_CRACK_H - not found.
-- Found GSSAPI: -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
CMake Error at plugin/auth_gssapi/CMakeLists.txt:23 (INCLUDE):
include could not find load file:

CheckCXXSymbolExists

CMake Error at plugin/auth_gssapi/CMakeLists.txt:24 (CHECK_CXX_SYMBOL_EXISTS):
Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS".

-- Configuring incomplete, errors occurred!

报错原因:
cmake的版本太低

--查看cmake的版本
[root@localhost mariadb-10.1.14]# cmake --version
cmake version 2.8.2

解决方法:
安装新版本的cmake工具--cmake-3.5.2

--卸载2.8版本的cmake工具

[root@localhost cmake-2.8.2]# make uninstall
-- Uninstalling "/usr/local/doc/cmake-2.8/cmake-properties.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/cmake-variables.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/cmake-modules.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/cmake-commands.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/cmake-compatcommands.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/ctest.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/ctest.docbook"
-- Uninstalling "/usr/local/doc/cmake-2.8/cpack.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/cpack.docbook"
-- Uninstalling "/usr/local/doc/cmake-2.8/ccmake.txt"
-- Uninstalling "/usr/local/doc/cmake-2.8/ccmake.docbook"
Built target uninstall

--下载新版本的cmake工具
[root@localhost install]# wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz --no-check-certificate
--2016-06-17 05:21:22-- https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
Resolving cmake.org... 66.194.253.19
Connecting to cmake.org|66.194.253.19|:443... connected.
WARNING: certificate common name "*.kitware.com" doesn't match requested host name "cmake.org".
HTTP request sent, awaiting response... 200 OK
Length: 6863498 (6.5M) [application/x-gzip]
Saving to: "cmake-3.5.2.tar.gz"

100%[===================================================================================================================>] 6,863,498 137K/s in 65s

2016-06-17 05:22:35 (104 KB/s) - "cmake-3.5.2.tar.gz" saved [6863498/6863498]

[root@localhost install]# tar fxvz cmake-3.5.2.tar.gz
[root@localhost install]# cd cmake-3.5.2
[root@localhost cmake-3.5.2]# ./bootstrap

--编译安装
[root@localhost cmake-3.5.2]# make
.....
[ 98%] Building C object Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeFiles/pseudonl_BC.dir/ret0.c.o
[ 99%] Linking C executable BC
[ 99%] Built target pseudonl_BC
Scanning dependencies of target pseudonl_purify
[ 99%] Building C object Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeFiles/pseudonl_purify.dir/ret0.c.o
[ 99%] Linking C executable purify
[ 99%] Built target pseudonl_purify
Scanning dependencies of target pseudonl_valgrind
[ 99%] Building C object Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeFiles/pseudonl_valgrind.dir/ret0.c.o
[ 99%] Linking C executable valgrind
[ 99%] Built target pseudonl_valgrind
Scanning dependencies of target pseudo_emulator
[ 99%] Building C object Tests/RunCMake/CMakeFiles/pseudo_emulator.dir/pseudo_emulator.c.o
[ 99%] Linking C executable pseudo_emulator
[ 99%] Built target pseudo_emulator
Scanning dependencies of target pseudo_iwyu
[100%] Building C object Tests/RunCMake/CMakeFiles/pseudo_iwyu.dir/pseudo_iwyu.c.o
[100%] Linking C executable pseudo_iwyu
[100%] Built target pseudo_iwyu
Scanning dependencies of target foo
[100%] Building CXX object Tests/FindPackageModeMakefileTest/CMakeFiles/foo.dir/foo.cpp.o
[100%] Linking CXX static library libfoo.a
[100%] Built target foo

[root@localhost cmake-3.5.2]# make install
.....
-- Installing: /usr/local/bin/ccmake
-- Installing: /usr/local/bin/cmake
-- Installing: /usr/local/bin/ctest
-- Installing: /usr/local/bin/cpack
-- Installing: /usr/local/share/cmake-3.5/include/cmCPluginAPI.h
-- Installing: /usr/local/share/cmake-3.5/editors/vim/cmake-help.vim
-- Installing: /usr/local/share/cmake-3.5/editors/vim/cmake-indent.vim
-- Installing: /usr/local/share/cmake-3.5/editors/vim/cmake-syntax.vim
-- Installing: /usr/local/share/cmake-3.5/editors/emacs/cmake-mode.el
-- Installing: /usr/local/share/aclocal/cmake.m4
-- Installing: /usr/local/share/cmake-3.5/completions/cmake
-- Installing: /usr/local/share/cmake-3.5/completions/cpack
-- Installing: /usr/local/share/cmake-3.5/completions/ctest

--查看cmake的版本
[root@localhost cmake-3.5.2]# cmake --version
cmake version 3.5.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

[root@localhost install]# cd mariadb-10.1.14
[root@localhost mariadb-10.1.14]# cmake . -LH

--可以正常进行编译
[root@localhost mariadb-10.1.14]# cmake . -DCMAKE_INSTALL_PREFIX=/maria \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_XTRADB_STORAGE_ENGINE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATEDX_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DCOMPILATION_COMMENT='MariaDB 10.1 production environment' \
-DWITH_READLINE=ON \
-DSYSCONFDIR=/maria_data/cnf \
-DMYSQL_UNIX_ADDR=/maria_data/maria.sock \
-DMYSQL_DATADIR=/maria_data

-- Running cmake version 3.5.2
-- MariaDB 10.1.14
-- Packaging as: mariadb-10.1.14-Linux-x86_64
-- OPENSSL_INCLUDE_DIR = /usr/include
-- OPENSSL_LIBRARIES = /usr/lib64/libssl.so
-- CRYPTO_LIBRARY = /usr/lib64/libcrypto.so
-- OPENSSL_MAJOR_VERSION = 1
-- SSL_LIBRARIES = /usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl
-- Checking for one of the modules 'libsystemd;libsystemd-daemon'
-- Systemd features not enabled
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.7.6")
-- Configuring done
-- Generating done
-- Build files have been written to: /install/mariadb-10.1.14

感谢各位的阅读!关于"MariaDB 10.1源码安装报错"Unknown CMake command "CHECK_CXX_SYMBOL_EXISTS""怎么办"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

版本 源码 工具 怎么办 内容 更多 篇文章 编译 不错 实用 原因 文章 方法 看吧 知识 参考 帮助 有关 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 致骋互联网科技 互联网科技的英文 艾特科技互联网 科技创新互联网企业 碳银互联网科技有限公司 赫美联合互联网科技 互联网金融监管科技 新华互联网科技校企合作 西藏七维空间互联网科技有限公司 互联网科技创新服务 阿大互联网科技有限公司 中国科技创新与世界互联网大会 如何创新互联网科技 西安小鹰速贷互联网科技有限公司 元气玛特互联网科技公司是外包吗 锡山区互联网智能科技产品供应 伍佰万互联网科技怎么赚钱 互联网安防科技感 昆明中奇联合互联网科技 高科技和互联网的现代国家 互联网是不是新科技 互联网品科技 壕鑫互联网络科技 上海电发互联网科技有限公司 广州慧亚互联网科技怎么样 金融科技与互联网金融相同和不同 科技互联网海报 2021世界互联网领先科技成果发布 北京军民互联网科技公司 广东猫王互联网科技有限公司电话
0