lua-users home
lua-l archive

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


On Sat, May 17, 2008 at 8:15 PM, mark morreny <markmorreny@gmail.com> wrote:
> Hi,
>
> I am quite new to Lua am I am trying to migrate my PHP socket code to Lua.
>
> The problem is that I can't get luasocket installed on my Debian machine:
>
> linux:/usr/src/luasocket-2.0.2# make
> cd src; make all
> make[1]: Entering directory `/usr/src/luasocket-2.0.2/src'
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic   -c -o luasocket.o
> luasocket.c
> luasocket.c:20:17: error: lua.h: No such file or directory

[...]

> When I do a fine, I can see lua.h in the lua 5.1.3 source directory
>
> linux:/usr/src/lua-5.1.3# find / -name lua.h
> /usr/src/lua-5.1.3/src/lua.h
>
> What is wrong with my setup?  How can I get luasocket installed properly?

You need to have lua.h somewhere that the luasocket makefile will find
it; there are two ways to do that, either to install lua.h and friends
to somewhere on the default search path, or to use
-I/usr/src/lua-5.1.3/src or similar in the luasocket makefile.

(I've not built/installed luasocket myself; this is just generic C
build stuff.)

HTH,

James