lua-users home
lua-l archive

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

I'm sure this is a stupid error by me:

'uname -rims'
Linux i686 AuthenticAMD

LuaJIT built by:

 1061  110516-21:20 make linux_rl
 1062  110516-21:22 make INSTALL_TOP=/opt/luajit/1.1.7 install

no errors here.

 1068  110516-21:26 -s /opt/luajit/1.1.7/ -t /usr/local/ create do
 1069  110516-21:26 make test


 0 4 # luajit-1.1.7
 sourced: '/root/.luarc'
 Lua 5.1.4  Copyright (C) 1994-2008, PUC-Rio
 LuaJIT 1.1.7  Copyright (C) 2005-2011 Mike Pall,
 > bit = require("bit")
 stdin:1: module 'bit' not found:
         no field package.preload['bit']
         no file './bit.lua'
         no file '/usr/local/share/lua/5.1/bit.lua'
         no file '/usr/local/share/lua/5.1/bit/init.lua'
         no file '/usr/local/lib/lua/5.1/bit.lua'
         no file '/usr/local/lib/lua/5.1/bit/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'
         stdin:1: in main chunk
         [C]: ?

The same happens with the distribution supplied LuaJIT, which is at
version 1.1.6.

There's one Lua related environment variable:


and .luarc contains only:

 0 4 # tv /root/.luarc
 -- /root/.luarc _date: 20101226-2152_
 -- vim: set filetype=lua ts=4:
 -- -*- mode: lua; -*-
 -- sourced after:
 -- export LUA_INIT="@${HOME:-/root}/.luarc"
 print("sourced: '/root/.luarc'")

The documentation states that the bitops are builtin and there's no
module to load, but even when I don't "require()" it, "bit" is nil.

What am I doing wrong?