LUA Missing on Centos 5.1 server

santrix

Well-Known Member
Nov 30, 2008
225
2
68
I am trying to fix an issue, and could do with some help. I have a few Centos 5.1 servers with the loa shared object in place and working fine with mod security (ASL Ruleset).

/opt/lua/lib/liblua.so

However one server does not have this. I don't remember ever having installed LUA manually either by compiling source or manually with a foreign rpm. So, I'm assuming that this library got there due to cpanel.

So, my question is, how can I get the shared library installed on this odd server? LUA won't compile from the lua.org source even though readline-devel and ncurses-devel are installed.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
You get that when you run EasyApache and enable Mod Security.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Yes, please run EasyApache with Mod_Security enabled. You should see the following directory after the EasyApache build:

/opt/lua/

If not, review the build log in /usr/local/cpanel/logs/easy/apache to determine if it failed to build for a specific reason. The following thread may also be of help to you:

Where is LUA

Thank you.
 

santrix

Well-Known Member
Nov 30, 2008
225
2
68
Done that... All I get is

Code:
# tree /opt/lua/
/opt/lua/
|-- bin
|   |-- lua
|   `-- luac
|-- include
|   |-- lauxlib.h
|   |-- lua.h
|   |-- lua.hpp
|   |-- luaconf.h
|   `-- lualib.h
|-- lib
|   |-- liblua.a
|   `-- lua
|       `-- 5.1
|-- lib64 -> /opt/lua/lib
|-- man
|   `-- man1
|       |-- lua.1
|       `-- luac.1
`-- share
    `-- lua
        `-- 5.1
No liblua.so file. The only bits from the apache build log that even mention lua are:

-- Begin step 'Checking for lua requirements' --
-- End step 'Checking for lua requirements' --
etc..
checking for liblua config script... no
checking for lua install... no
configure: optional lua library not found
etc...
and a few libtool commands.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Were any of the posts from the thread referenced in my last response helpful? In particular, the last post to that thread mentions a workaround that some users have found helpful.

Thank you.
 

santrix

Well-Known Member
Nov 30, 2008
225
2
68
Were any of the posts from the thread referenced in my last response helpful? In particular, the last post to that thread mentions a workaround that some users have found helpful.

Thank you.
Yup - used the guide

Lua-5.2.3

However, I did have to include an extra environment tweak to get it to compile

make linux MYLIBS=-lncurses

For some reason ncurses was not being seen by readline so it was failing on a bunch of symbol references. All good now.