在centos 7.9 安装 mysql是遇到报错

问题遇到的现象和发生背景

安装mysql时遇到如下报错

运行结果及报错内容

CMake Warning at CMakeLists.txt:313 (MESSAGE):
Could not find devtoolset compiler in /opt/rh/devtoolset-10

CMake Error at CMakeLists.txt:315 (MESSAGE):
Please set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.

我的解答思路和尝试过的方法

尝试过重现安装依赖程序,依旧报错上面这个错误。不知道如何解决

问题解决了,受下面这个博文的启发,安装了最新的devtoolset-10后,就没有之前的报错了,但是又有了行的报错。
https://blog.csdn.net/?spm=1010.2135.3001.4477

以下内容是新的报错
CMake Error at CMakeLists.txt:450 (MESSAGE):
Please do not build in-source. Out-of source builds are highly
recommended: you can have multiple builds for the same source, and there is
an easy way to do cleanup, simply remove the build directory (note that
'make clean' or 'make distclean' does not work)

You can force in-source build by invoking cmake with
-DFORCE_INSOURCE_BUILD=1