在宝塔面板安装Apache2.4版本不成功,提示error: mod_lua has been requested but can not be built due to prerequisite
程序员文章站
2022-07-14 18:47:59
...
问题场景:
购买了华为云的鲲鹏服务器后(CentOS8版本,yum源是华为官方arm源),然后安装宝塔后再在宝塔面板安装Apache2.4版本不成功,出现下列错误:
configure: WARNING: *** Lua 5.3 5.2 or 5.1 library not found.
configure: WARNING: Lua 5.3 5.2 or 5.1 library is required
checking whether to enable mod_lua... configure: error: mod_lua has been
requested but can not be built due to prerequisite failures
make: *** No targets specified and no makefile found. Stop.
make: ** No rule to make target install'. Stop.
主要问题是mod_lua模块没有安装上。如果你这时在宝塔面板安装Apache2.2版本是成功,但是你可以去试试宝塔面板添加站点是提示没有对应的PHP版本,所以还是老老实实来解决这个2.4问题,因为我解决后可以添加站点了,根本原因就是这个。
解决办法来了:
centOS输入下面命令安装对应的模块:
yum -y install lua lua-devel
但是我的服务器是aarch64架构的,所以提示了下列错误:
Repository AppStream is listed more than once in the configuration
Last metadata expiration check: 0:42:22 ago on Sun 19 Apr 2020 09:18:09 PM CST.
Error:
Problem: cannot install the best candidate for the job
- nothing provides libreadline.so.6()(64bit) needed by lua-5.3.5-1.aarch64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[aaa@qq.com ~]# yum -y install lua lua-devel --skip-broken
Repository AppStream is listed more than once in the configuration
Last metadata expiration check: 0:42:43 ago on Sun 19 Apr 2020 09:18:09 PM CST.
Dependencies resolved.
解决办法:
再次输入下面命令跳过错误安装即可:
yum -y install lua lua-devel --skip-broken
我输入安装模块后,再去点击宝塔面板的Apache2.4版本急速安装已经成功!推荐大家试试,这是解决mod_lua错误的解决办法。
再提示一句:如果在宝塔面板安装Apache或者其他软件,发现安装不成功,记得查看宝塔面板软件安装的执行日志查看错误: