lua-users home
lua-l archive

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

On Sun, Nov 2, 2008 at 6:19 PM, František Fuka <> wrote:
> Hello there,
> can please someone enlighten me how should I use Lua libraries in existing
> Ubuntu 8.04 packages? I have unmodified Lua 5.1.1 and "bit" Lua library
> installed from Ubuntu packages and yet...

Are you sure you are using the one you installed, and not one from

> Lua 5.1.1  Copyright (C) 1994-2006, PUC-Rio
>> require("bit")
> stdin:1: module 'bit' not found:
>     no field package.preload['bit']
>     no file './'
>     no file '/usr/local/lib/lua/5.1/'
>     no file '/usr/local/lib/lua/5.1/'

An ubuntu lua binary should have searched for in
/usr/lib/lua*/... something.

But yours searched only in /usr/local and the current directory.

Do "which lua" to see which lua you are using.
Do "dpkg -L the_package_name" to see where your lua libraries are.

Figure out where lua searches:

 % lua
Lua 5.1.1  Copyright (C) 1994-2006, PUC-Rio
> print(package.cpath)
> print(package.path)