[Freeswitch-users] Luasocket not loading on 1.2 stable
Neil Patel
neilp at cs.stanford.edu
Mon Nov 25 15:34:43 MSK 2013
Hi All,
I have FS 1.2 stable installed on fresh Ubuntu 12.04 LTS. I installed lua
and lua socket libraries from package:
# apt-get install lua5.1 liblua5.1-socket-dev liblua5.1-socket2
This installed socket module in /usr/lib/i386-linux-gnu/lua/5.1/, which I
added as a module directory in lua.conf.xml.
When I attempt to run the command "require 'socket.http'" in a lua script
within FS, I get this error:
2013-11-25 10:14:38.394321 [ERR] mod_lua.cpp:199
/usr/local/freeswitch/scripts/test.lua:27: module 'socket.http' not found:
no field package.preload['socket.http']
no file './socket/http.lua'
no file '/usr/local/share/lua/5.1/socket/http.lua'
no file '/usr/local/share/lua/5.1/socket/http/init.lua'
no file '/usr/local/lib/lua/5.1/socket/http.lua'
no file '/usr/local/lib/lua/5.1/socket/http/init.lua'
no file '/usr/lib/i386-linux-gnu/lua/5.1/socket/http.so'
no file '/usr/lib/i386-linux-gnu/lua/5.1/socket.so'
stack traceback:
[C]: in function 'require'
It's looking for http.so; however in the socket module library there are
only the files core.so and unix.so
When I run lua interpreter from terminal and try the same require command,
it works without complaint:
root at server:~# lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require "socket.http";
>
So why is FS' lua complaining about a luasocket library that standard lua
isn't, and how do I deal with it?
Thanks,
Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131125/0bf4f966/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list