Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4731

LUA no field package.preload

$
0
0

@Manic wrote:

Hi folks,

Pretty new to HaProxy. Installed with LUA and able to trigger lua functoins. But have an issue is loading LUA modules. Say i want to use sha1.lua, not able to load the module inspite of file available in the said location. Getting this error:

Apr 13 16:00:52 a3 haproxy: no field package.preload[‘sha1’]
Apr 13 16:00:52 a3 haproxy: no file ‘/usr/local/share/lua/5.3/sha1.lua’
Apr 13 16:00:52 a3 haproxy: no file ‘/usr/local/share/lua/5.3/sha1/init.lua’
Apr 13 16:00:52 a3 haproxy: no file ‘/usr/local/lib/lua/5.3/sha1.lua’
Apr 13 16:00:52 a3 haproxy: no file ‘/usr/local/lib/lua/5.3/sha1/init.lua’
Apr 13 16:00:52 a3 haproxy: no file ‘./sha1.lua’
Apr 13 16:00:52 a3 haproxy: no file ‘./sha1/init.lua’
Apr 13 16:00:52 a3 haproxy: no file ‘/usr/local/lib/lua/5.3/sha1.so’
Apr 13 16:00:52 a3 haproxy: no file ‘/usr/local/lib/lua/5.3/loadall.so’
Apr 13 16:00:52 a3 haproxy: no file ‘./sha1.so’ from [C] global ‘require’, /home/xxxxxx/haproxy-plugin/dddd.lua:105 C function line 104.

I am using lua 5.3, haproxy 2.0.13 versions. To confirm its not a lua problem.

wrote a simple test.lua below:

local sha = require(“sha1”);
print(sha.sha1(“hello”));

on running this, command line , its perfect
[root@a3 haproxy-2.0.13]# lua test.lua
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
[root@a3 haproxy-2.0.13]#

any ideas on what i am missing? your help is really appreciated.

Thanks,
Manic

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4731

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>