lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> 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 './'
>  no file '/usr/local/lib/lua/5.1/'
>  no file '/usr/local/lib/lua/5.1/'
> 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)