0

I am using CentOS 5.

I am trying using Mod_Security which requires liblua. I was not able to find lua on the default repos. I prefer not to use any third party repos. This in mind, I downloaded the lua source from the offical site. After compiling the only file even close is liblua.a. I need a liblua-5.1(.4).so file for Apache.

How do I make a .so file for liblua?

3 Answers 3

1

Grab a similar-enough SRPM and rebuild it, preferably with mock.

EDIT:

Oh great, now you've done it. See what happens when I get bored?

1
  • Can you clarify? I haven't used mock, I take it you recommended it for testing the install first? I attempted a rpm -i [rpm name] but it complained the MD5 sum did not match for file lua-5.1.4-autotoolize.patch. May 12, 2010 at 21:22
0

Desiring to compile from source rather than enable a 3rd party repository is an anti-pattern.

0

For future reads of this, to do this from source you do the following:

Download Lua source from site.
yum install curses-devel readline-devel
make linux (you may need to get a few other devel libraries if the above fails)
cd /usr/local/lib
gcc -shared -o liblua.5.1.3.so /usr/local/lib/liblua.a
mv liblua.5.1.3.so liblua.5.1.3.so /usr/lib/

Note to load this, and libxml2 into mod_security you need to use LoadFile not LoadModule.
LoadFile /usr/lib/libxml2.so
LoadFile /usr/lib/liblua.5.1.3.so
1
  • 2
    You should really get out of the habit of copying these to /usr/lib/, leave that for the RPM supplied .so files. Keep them in /usr/local/lib/ where they belong and be a good sysadmin. :)
    – user15590
    Jun 7, 2010 at 4:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .