MySQL系列—编译安装8.0版本时gcc及cmake版本说明

  • 时间:2025-11-10 18:06 作者: 来源: 阅读:0
  • 扫一扫,手机访问
摘要:MySQL 8.0.16以上版本是C++14标准,编译安装时需gcc 5.3以上版本。本人在结合cmake编译工具的情况下,经过多版本测试,gcc版本10.2.1是最好的选择,同时cmake的版本为3.19.8。下面是在测试过程中遇到的错误信息详情。1.使用gcc9.3.1时,cmake版本不能超过3.19.0## 若使用3.19.1-3.19.8版本的cmake,就会出现如下的错误信息,无法完成

MySQL系列—编译安装8.0版本时gcc及cmake版本说明

MySQL 8.0.16以上版本是C++14标准,编译安装时需gcc 5.3以上版本。本人在结合cmake编译工具的情况下,经过多版本测试,gcc版本10.2.1是最好的选择,同时cmake的版本为3.19.8。

下面是在测试过程中遇到的错误信息详情。

1.使用gcc9.3.1时,cmake版本不能超过3.19.0

## 若使用3.19.1-3.19.8版本的cmake,就会出现如下的错误信息,无法完成编译。错误信息中已提示找不到gcc 10编译器

Could not find devtoolset compiler in /opt/rh/devtoolset-10

MySQL系列—编译安装8.0版本时gcc及cmake版本说明

## 若使用3.20.x版本的cmake,则会出现如下的错误信息,无法完成编译。错误信息中也提示找不到gcc 10编译器

MySQL系列—编译安装8.0版本时gcc及cmake版本说明



2.使用gcc10.2.1时,cmake最好不要使用3.20.x版本,使用3.20.x版本会出现Warning提示(如下所示),但能完成cmake配置,也能完成MySQL的安装,简单测试使用也无问题。MySQL后续使用中是否会出现问题不知道。个人提议在安装过程中尽量避免出现一些不正常的提示信息。

-- Running cmake version 3.20.1
-- Found Git: /bin/git (found version "1.8.3.1") 
CMake Deprecation Warning at cmake/cmake_policies.cmake:54 (CMAKE_POLICY):
  The OLD behavior for policy CMP0075 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:233 (INCLUDE)


-- CMP0073 OLD
CMake Deprecation Warning at cmake/cmake_policies.cmake:62 (CMAKE_POLICY):
  The OLD behavior for policy CMP0073 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:233 (INCLUDE)


-- This is .el7. as found from 'rpm -qf /'
-- Looking for a devtoolset compiler
-- Using /opt/rh/devtoolset-10/root/usr/bin/gcc
-- Using /opt/rh/devtoolset-10/root/usr/bin/g++

MySQL系列—编译安装8.0版本时gcc及cmake版本说明

MySQL系列—编译安装8.0版本时gcc及cmake版本说明

MySQL系列—编译安装8.0版本时gcc及cmake版本说明

  • 全部评论(0)
上一篇:已是第一篇内容
下一篇:调整随机森林超参数的可视化指南
最新发布的资讯信息
【系统环境|】MySQL系列—编译安装8.0版本时gcc及cmake版本说明(2025-11-10 18:06)
【系统环境|】调整随机森林超参数的可视化指南(2025-11-10 18:05)
【系统环境|】机器学习「铁三角」:Numpy、Pandas、Matplotlib协同实战指南(2025-11-10 18:05)
【系统环境|】在XGBoost和LightGBM模型中强制执行单调约束的python教程(2025-11-10 18:04)
【系统环境|】Python可视化交互库——dash——设置颜色(2025-11-10 18:04)
【系统环境|】MySQL 5.5 安装教程(附安装包下载)(2025-11-10 18:03)
【系统环境|】centos系统下安装MySQL5.7.18方法详解(2025-11-10 18:03)
【系统环境|】Windows安装Mysql及卸载(2025-11-10 18:02)
【系统环境|】MySQL安装(详细,适合小白)(2025-11-10 18:02)
【系统环境|】程序员必备技能——解压版MySQL安装(2025-11-10 18:01)
手机二维码手机访问领取大礼包
返回顶部