[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: best linux Distro for Lua programming
- From: Wesley Smith <wesley.hoke@...>
- Date: Wed, 30 Jun 2010 17:38:26 +0200
>
> patrick@FatBox:~/unique/lua$ lua curl1.lua
> lua: curl1.lua:2: module 'curl' not found:
> no field package.preload['curl']
> no file './curl.lua'
> no file '/usr/local/share/lua/5.1/curl.lua'
> no file '/usr/local/share/lua/5.1/curl/init.lua'
> no file '/usr/local/lib/lua/5.1/curl.lua'
> no file '/usr/local/lib/lua/5.1/curl/init.lua'
> no file './curl.so'
> no file '/usr/local/lib/lua/5.1/curl.so'
> no file '/usr/local/lib/lua/5.1/loadall.so'
> stack traceback:
> [C]: in function 'require'
> curl1.lua:2: in main chunk
> [C]: ?
>
So based on this info, you should be able to figure out where to place
the curl module. You can add additional paths with:
function addmodulepath(path)
-- add to package paths (if not already present)
if not string.find(package.path, path, 0, true) then
package.path = string.format("%s/?.lua;%s", path, package.path)
package.path = string.format("%s/?/init.lua;%s", path, package.path)
package.cpath = string.format("%s/?.so;%s", path, package.cpath)
end
end