I can not enable lua with liblua.so in centos

135 views
Skip to first unread message

qian yang

unread,
Sep 19, 2022, 6:04:31 AM9/19/22
to meetecho-janus
I use CentOS7.9 and build liblua.so from source,
I used enable-plugin-lua, LUA_CFLAGS and LUA_LIBS parameters to build Janus and I can build successfully.
Here is my build command:
./configure --prefix=/opt/janus --enable-websockets --enable-post-processing --enable-plugin-lua LUA_CFLAGS="-I/root/lua/usr/local/include  -Wl,-rpath=." LUA_LIBS="-L/root/lua/usr/local/lib -Wl,-rpath=../../../bin"

But when I run janus I get this error:
Loading plugin 'libjanus_lua.so'...
[ERR] [janus.c:main:5548]       Couldn't load plugin 'libjanus_lua.so': /opt/janus/lib/janus/plugins/libjanus_lua.so: undefined symbol: lua_gettop

I tried to put the liblua file in the janus bin directory, but still get the same error, I want to know how to solve this error.
thanks for you help

qian yang

unread,
Sep 19, 2022, 6:07:54 AM9/19/22
to meetecho-janus
The lua version is 5.4.4

Lorenzo Miniero

unread,
Sep 19, 2022, 7:32:47 AM9/19/22
to meetecho-janus
Since you have Lua installed in a non-standard path, you'll have to specify it via LD_LIBRARY_PATH when launching Janus, or the Lua lib won't be found.

L.

qian yang

unread,
Sep 19, 2022, 9:45:46 PM9/19/22
to meetecho-janus
According to you, I tried moving the liblua.so into the janus execution directory and running "export LD_LIBRARY_PATH=/opt/janus/bin", but still getting this error I said

Lorenzo Miniero

unread,
Sep 20, 2022, 3:52:08 AM9/20/22
to meetecho-janus
That's not what I said. Leave the library where it is, and set the LD_LIBRARY_PATH to where the library is.

L.

qian yang

unread,
Sep 20, 2022, 11:35:38 PM9/20/22
to meetecho-janus
I made it, thanks
I installed liblua using apt in debian, then copied the lua.pc file in pkgconfig to the janus compilation directory of centos, modified the prefix parameter in lua.pc and then build janus
now run janus can read the lua script normally
Reply all
Reply to author
Forward
0 new messages