centos7中安装MySQL时CMake报错mysql-5.6.38/CMakeFiles/CMakeError.log"

版权声明:转载请声明! https://blog.csdn.net/qq_34672033/article/details/90199582

centos7中安装MySQL时CMake报错

报错

-- Configuring incomplete, errors occurred!

See also "/tools/mysql-5.6.38/CMakeFiles/CMakeOutput.log".
See also "/tools/mysql-5.6.38/CMakeFiles/CMakeError.log".

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Performing Test HAVE_PEERCRED - Failed
-- Library mysqlclient depends on OSLIBS -lpthread;m;dl
-- Download failed, error: 28;"Timeout was reached"
-- To enable googletest, please download https://github.com/google/googletest/archive/release-1.8.0.zip to the directory /tools/mysql-5.6.38/source_downloads
-- If you are inside a firewall, you may need to use an https proxy: export https_proxy=http://example.com:80
Warning: Bison executable not found in PATH
-- Library mysqlserver depends on OSLIBS -lpthread;m;crypt;dl;aio
-- Skipping deb packaging on unsupported platform Core.
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: HAVE_CONFIG_H
-- CMAKE_C_FLAGS:  -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS:
-- CMAKE_C_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO:  -DDBUG_OFF
-- Configuring incomplete, errors occurred!
See also "/tools/mysql-5.6.38/CMakeFiles/CMakeOutput.log".
See also "/tools/mysql-5.6.38/CMakeFiles/CMakeError.log".

解决方法

网上查了很多资料,大部分说需要安装 gcc相关的编译器,我想了一下因为是新机器确实没有安装过gcc相关的编译器

yum install -y gcc gcc-c++

删除产生的CMakeCache.txt文件,然后重新运行cmake

rm -r CMakeCache.txt

说明:

此文件再MySQL安装目录中

猜你喜欢

转载自blog.csdn.net/qq_34672033/article/details/90199582