Solved [SOLVED] Installation error on a stable channel (related to lua?)

MaXi32

Verified User
Joined
Jul 25, 2016
Messages
659
Location
The Earth
Running a new installation today on a stable channel and I got the following error:

/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -std=c++11 -I.. -g -I../others -fPIC -O3 -I../headers -DWITH_GEOIP -I/usr/include/ -DWITH_YAJL -I/usr/include/yajl -DPCRE_HAVE_JIT -I/usr/include -DWITH_LUA -DWITH_LUA_5_4 -I/usr/include/lua5.1 -I/usr/include/libxml2 -DWITH_LIBXML2 -g -O2 -MT engine/libmodsecurity_la-lua>libtool: compile: g++ -DHAVE_CONFIG_H -I. -std=c++11 -I.. -g -I../others -fPIC -O3 -I../headers -DWITH_GEOIP -I/usr/include/ -DWITH_YAJL -I/usr/include/yajl -DPCRE_HAVE_JIT -I/usr/include -DWITH_LUA -DWITH_LUA_5_4 -I/usr/include/lua5.1 -I/usr/include/libxml2 -DWITH_LIBXML2 -g -O2 -MT engine/libmodsecurity_la-lua.lo -MD -MP -MF engine/.deps/libmodsecur>libtool: compile: g++ -DHAVE_CONFIG_H -I. -std=c++11 -I.. -g -I../others -fPIC -O3 -I../headers -DWITH_GEOIP -I/usr/include/ -DWITH_YAJL -I/usr/include/yajl -DPCRE_HAVE_JIT -I/usr/include -DWITH_LUA -DWITH_LUA_5_4 -I/usr/include/lua5.1 -I/usr/include/libxml2 -DWITH_LIBXML2 -g -O2 -MT actions/transformations/libmodsecurity_la-utf8_to_unicode.lo -MD -MP>engine/lua.cc: In member function 'bool modsecurity::engine::Lua::load(const string&, std::string*)':
engine/lua.cc:87:75: error: too many arguments to function 'int lua_dump(lua_State*, lua_Writer, void*)'
87 | if (lua_dump(L, Lua::blob_keeper, reinterpret_cast<void *>(&m_blob), 0)) {
| ^
In file included from /usr/include/lua5.1/lua.hpp:6,
from ../src/engine/lua.h:17,
from engine/lua.cc:17:
/usr/include/lua5.1/lua.h:207:14: note: declared here
207 | LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data);
| ^~~~~~~~
engine/lua.cc: In member function 'int modsecurity::engine::Lua::run(modsecurity::Transaction*, const string&)':
engine/lua.cc:145:13: error: too many arguments to function 'int lua_load(lua_State*, lua_Reader, void*, const char*)'
145 | NULL);
| ^
In file included from /usr/include/lua5.1/lua.hpp:6,
from ../src/engine/lua.h:17,
from engine/lua.cc:17:
/usr/include/lua5.1/lua.h:204:16: note: declared here
204 | LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt,
| ^~~~~~~~
engine/lua.cc: In static member function 'static std::string modsecurity::engine::Lua::applyTransformations(lua_State*, modsecurity::Transaction*, int, std::string)':
engine/lua.cc:423:20: error: 'lua_rawlen' was not declared in this scope; did you mean 'lua_rawset'?
423 | int i, n = lua_rawlen(L, idx);
| ^~~~~~~~~~
| lua_rawset
make[3]: *** [Makefile:2678: engine/libmodsecurity_la-lua.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f actions/transformations/.deps/libmodsecurity_la-utf8_to_unicode.Tpo actions/transformations/.deps/libmodsecurity_la-utf8_to_unicode.Plo
make[3]: Leaving directory '/usr/local/directadmin/custombuild/modsecurity-v3.0.8/src'
make[2]: *** [Makefile:3308: all-recursive] Error 1
make[2]: Leaving directory '/usr/local/directadmin/custombuild/modsecurity-v3.0.8/src'
make[1]: Leaving directory '/usr/local/directadmin/custombuild/modsecurity-v3.0.8/src'
make[1]: *** [Makefile:1048: all] Error 2
make: *** [Makefile:1044: all-recursive] Error 1
*** The make has failed. Exiting...
2023/02/20 03:31:43 info executing task task=action=notify&message=CustomBuild+installation+has+failed%2C+please+check+the+following+file+for+more+information%3A%0A%2Fvar%2Flog%2Fdirectadmin%2Fcustombuild.1676834782.411630.log&subject=CustomBuild+installation+has+failed&value=admin


I think this might be related to Lua. Prior to installing DirectAdmin, I compile my own version of Lua and currently have Lua 5.4.4 installed on my system. Can anyone provide insight into what DirectAdmin is attempting to accomplish with its own Lua package?

root@sun:~# lua
Lua 5.4.4 Copyright (C) 1994-2022 Lua.org, PUC-Rio

Any clue to bypass this installation error on STABLE channel? :mad:

@DirectAdmin Support
 
Found an old solution here:


But this shouldn't happen in a new install.

Could you please explain why we need to remove those files, and whether it is safe to do so? While I understand that the command 'rm -f /usr/local/include/lua*' targets files related to the Lua programming language, I want to be sure that it is safe to delete them and that they are not needed by any other software on the system.
 
[SOLVED]

I was able to solve the installation issue by installing both lua versions 5.1 and 5.4 separately before running the DA installation. If I only installed version 5.4, the installation process would halt.
 
Last edited:
Back
Top