Project

General

Profile

Actions

Support #3121

closed

centos7 lua support

Added by js Chen over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Affected Versions:
Label:

Description

I use Centos7(docker) to run suricata4.1.4,but I use "make install" lua 5.3.5 to instead of system lua5.1.4, just like ln \-s /<mylua 5.3.5>/lua /usr/bin/lua . I can use lua 5.3.4 in terminal.And I also usr luarocks install redis-lua and luasockets, them worked.
But when I run suricata,it only use system lua5.1.4,so my suricata can't working.Is there some setting to appoint lua?I holp somebody can help me to use lua5.3.5.
this is my error log:
21/8/2019 -- 02:21:46 - <Error> - [ERRCODE: SC_ERR_LUA_ERROR(212)] - couldn't prime file: /etc/suricata/rules/lua-test.lua:16: module 'redis' not found:
no field package.preload['redis']
no file './redis.lua'
no file '/usr/share/lua/5.1/redis.lua'
no file '/usr/share/lua/5.1/redis/init.lua'
no file '/usr/lib64/lua/5.1/redis.lua'
no file '/usr/lib64/lua/5.1/redis/init.lua'
no file './redis.so'
no file '/usr/lib64/lua/5.1/redis.so'
no file '/usr/lib64/lua/5.1/loadall.so'
21/8/2019 -- 02:21:46 - <Error> - [ERRCODE: SC_ERR_LUA_ERROR(212)] - couldn't initialize scipt
21/8/2019 -- 02:21:46 - <Error> - [ERRCODE: SC_ERR_LUA_ERROR(212)] - Error during setup of lua output. Details should be described in previous error messages. Shutting down...

Actions #1

Updated by js Chen over 5 years ago

I print the suricata's lua version and lua path/cpath,it shows lua is 5.1,but I want to use 5.3.So it bad work.
21/8/2019 -- 03:22:00 - <Notice> - This is Suricata version 4.1.4 RELEASE
test-red()
suricata -- use lua is Lua 5.1
lua path is ./?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib64/lua/5.1/?.lua;/usr/lib64/lua/5.1/?/init.lua
lua cpath is./?.so;/usr/lib64/lua/5.1/?.so;/usr/lib64/lua/5.1/loadall.so

Actions #2

Updated by Andreas Herz over 5 years ago

  • Assignee set to Community Ticket
  • Priority changed from High to Normal
  • Target version set to Support

Is there no system package for a newer lua version?
If you just link to the binary that won't be enough.
You can try to run configure and set --with-liblua-includes and --with-liblua-libraries

Actions #3

Updated by js Chen over 5 years ago

Andreas Herz wrote:

Is there no system package for a newer lua version?
If you just link to the binary that won't be enough.
You can try to run configure and set --with-liblua-includes and --with-liblua-libraries

I fix this error.I modify configure
" # lua pkg-config name differs per OS
LUA_PC_NAME="lua5.1"
LUA_LIB_NAME="lua5.1" "
to
"
LUA_PC_NAME="lua5.3"
LUA_LIB_NAME="lua5.3"
".
So it worked with lua5.3.
Thank you!

Actions #4

Updated by Andreas Herz over 5 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF