«

»

Aug 26

Error while loading shared libraries: liblua.so

I got this liblua error while apache,php recompilation.

At first I tried to find the dependencies of lua

# ldd `which lua`
linux-vdso.so.1 => (0x00007fff1dd7d000)
liblua.so => not found
libreadline.so.6 => /lib64/libreadline.so.6 (0x0000003b68800000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x0000003b68400000)
libm.so.6 => /lib64/libm.so.6 (0x0000003b68000000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003b67800000)
libc.so.6 => /lib64/libc.so.6 (0x0000003b67400000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x0000003b6a400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b67000000)

Then I tried to search for liblua in “/” using find command.

# find / -iname liblua*
/opt/lua/lib/liblua.a
/opt/lua/lib/liblua-5.1.so

The made a symlink like as follows:

# ln -s /opt/lua/lib/liblua-5.1.so /opt/lua/lib/liblua.so

# ll /opt/lua/lib/liblua.so
lrwxrwxrwx 1 root root 13 Aug 18 11:08 /opt/lua/lib/liblua.so -> liblua-5.1.so*

Now do recompile again and finish the process successfully 🙂

In case if lua is completely missing, you can install using yum or do manual compilation.

# yum install lua lua-devel

for manual compilation, download lua source from http://www.lua.org/download.html and install it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>