lua-users home
lua-l archive

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


On Tue, Feb 28, 2012 at 5:35 AM, Choonster TheMage
<choonster.2010@gmail.com> wrote:
> Hi,
>
> I'm trying to install the the Lua library "lzlib" via LuaRocks, but the
> compiler can't seem to find the appropriate binary for zlib. When I run
> "luarocks install lzlib" at the command line, I get one of these errors:
>
> On Ubuntu 11.10 64 bit: "Error: Could not find expected file libz.so for
> ZLIB -- you may have to install ZLIB in your system and/or set the ZLIB_DIR
> variable"
>
> On Windows 7 64 bit "Error: Could not find expected file libz.dll for ZLIB
> -- you may have to install ZLIB in your system and/or set the ZLIB_DIR
> variable"
>
>
> I've tried setting the ZLIB_DIR variable both at the command line (luarocks
> ZLIB=/blah/blah/blah install lzlib) and in the build.build_variables section
> of the rockspec (after downloading and extracting manually through LuaRocks)
> but I still get the same error.

Where is your libz.so file? If it is at /usr/lib/libz.so, you should use it as:

luarocks ZLIB_DIR=/usr build lzlib

ZLIB_DIR works as a "prefix" variable, and ZLIB_LIBDIR and ZLIB_INCDIR
are produced as ZLIB_DIR/lib and ZLIB_DIR/include. If that's not the
case in your system, you can pass ZLIB_LIBDIR and ZLIB_INCDIR
explicitly.

Hope that helps,

-- Hisham
http://hisham.hm/