AMH面板选择MYSQL8.0安装失败

wget http://dl.amh.sh/amh.sh && bash amh.sh nginx-1.20,mysql-8.0,php-8.1

数据库选择8.0就会报下列错误,但选择5.7就正常。已经安装了依赖包GIT,但还是报错

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- Running cmake version 3.20.2
-- Could NOT find Git (missing: GIT_EXECUTABLE) 
CMake Deprecation Warning at cmake/cmake_policies.cmake:59 (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:234 (INCLUDE)


-- This is .el8. as found from 'rpm -qf /'
-- Looking for a devtoolset compiler
CMake Warning at CMakeLists.txt:313 (MESSAGE):
  Could not find devtoolset compiler in /opt/rh/gcc-toolset-10


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


-- Configuring incomplete, errors occurred!
make: *** 没有指明目标并且找不到 makefile。 停止。
make: *** 没有规则可制作目标“install”。 停止。
chmod: 无法访问'/usr/local/mysql-8.0': No such file or directory
chown: 无法访问'/usr/local/mysql-8.0': No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行132: /usr/local/mysql-8.0/bin/mysqld: No such file or directory
chmod: 无法访问'/home/usrdata/mysql-8.0': No such file or directory
chown: 无法访问'/home/usrdata/mysql-8.0': No such file or directory
sed:无法读取 /usr/local/mysql-8.0/support-files/mysql.server:No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行137: /usr/local/mysql-8.0/support-files/mysql.server: No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行140: /usr/local/mysql-8.0/bin/mysqladmin: No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行142: /usr/local/mysql-8.0/bin/mysql: No such file or directory
[Notice] mysql-8.0 is not installed.
==========================================================================
抱歉。安装 AMH 失败了,
如有需要帮助安装,请联系我们: https://amh.sh/bbs/forum.htm
==========================================================================

以下是已经安装了依赖包GIT文件后的报错

groupadd:“mysql”组已存在
useradd:用户“mysql”已存在
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- Running cmake version 3.20.2
-- Found Git: /bin/git (found version "2.31.1") 
CMake Deprecation Warning at cmake/cmake_policies.cmake:59 (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:234 (INCLUDE)


-- This is .el8. as found from 'rpm -qf /'
-- Looking for a devtoolset compiler
CMake Warning at CMakeLists.txt:313 (MESSAGE):
  Could not find devtoolset compiler in /opt/rh/gcc-toolset-10


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


-- Configuring incomplete, errors occurred!
make: *** 没有指明目标并且找不到 makefile。 停止。
make: *** 没有规则可制作目标“install”。 停止。
chmod: 无法访问'/usr/local/mysql-8.0': No such file or directory
chown: 无法访问'/usr/local/mysql-8.0': No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行132: /usr/local/mysql-8.0/bin/mysqld: No such file or directory
chmod: 无法访问'/home/usrdata/mysql-8.0': No such file or directory
chown: 无法访问'/home/usrdata/mysql-8.0': No such file or directory
sed:无法读取 /usr/local/mysql-8.0/support-files/mysql.server:No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行137: /usr/local/mysql-8.0/support-files/mysql.server: No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行140: /usr/local/mysql-8.0/bin/mysqladmin: No such file or directory
/root/amh/modules/mysql-8.0/AMHScript:行142: /usr/local/mysql-8.0/bin/mysql: No such file or directory
[Notice] mysql-8.0 is not installed.

根据提示未找到gcc-toolset-10,进行依赖库安装dnf install gcc-toolset-10,激活gcc版本,使其生效

scl enable gcc-toolset-10 bash

最后再进行安装。成功。

阅读 2.2k
1 个回答

yum安装gcc-toolset-10这个包,如果还报错,
确认是否有安装成功,
rpm -qa | grep gcc-toolset
cat /opt/rh/gcc-toolset-10/enable

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题