[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Trouble compiling Lua Socket...
- From: Matthew Percival <matthew@...>
- Date: Thu, 28 Jul 2005 12:32:16 +1000
G'Day,
I seem to now be having problems simply using Lua Socket!
Firstly, Lua seems to ignore the paths I set. Even if I do:
set LUA_PATH=/usr/local/share/lua/5.0/?.lua;?.lua
as described, when I use:
require("smtp")
I get:
stdin:1: could not load package `smtp' from path `?;?.lua'
I have bypassed this problem by first adding:
LUA_PATH = "/usr/local/share/lua/5.0/?.lua;"..
"/usr/local/share/lua/5.0/socket/?.lua;"
before calling require(). Not an elegant solution, but enough of a
bandaid to get started. If anyone could point out what I am doing wrong
in setting Lua's path for Linux, I would love to solve this problem
properly.
Secondly, when I do manage to get the paths correct, I get the
following error:
/usr/local/share/lua/5.0/socket/smtp.lua:11: could not load package `base' from
path `/usr/local/share/lua/5.0/?.lua;/usr/local/share/lua/5.0/socket/?.lua;'
When I check, I do not have any base.lua, so that makes sense. However,
I cannot find what this is or where I get it. I have even checked an
Ubuntu system with lua50 and luasocket packages installed, and this did
not have this file either. When I looked at the require() lines in
smtp.lua, I found that I have not got half the files it is looking for.
Lua Socket does not list any dependencies that I could see, so I am a
little lost as to how I have managed this.
I have been able to use Lua perfectly fine for some months now, so I
was a little surprised when these problems came up. Hopefully someone
more familiar with the language will quickly pick up on what I am doing
wrong though: it is surely a simple newbie mistake.
-- Matthew