I'm trying fbclient 0.5.0 on ubuntu 10.10 (maverick 32bit). but getting the following messages.
>lua: /usr/local/share/lua/5.1//fbclient/util.lua:147: attempt to index local 'alien' (a boolean value)
The LuaSocket similarly installed by luarocks is normal. Please see the my test code.
Location is: /usr/local/share/lua/5.1/ alien.lua fbclient/ socket/ ...
What is the cause?
-- test.lua print ("path="..package.path) print ("cpath="..package.cpath)
require 'luarocks.require'
local socket = require( "socket" ) print("socket:".. socket._VERSION)
local fb = require 'fbclient.class' print("fbclient:".. fb._VERSIONN)
-- Result
path=./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua cpath=./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so socket:LuaSocket 2.0.2 lua: /usr/local/share/lua/5.1//fbclient/util.lua:147: attempt to index local 'alien' (a boolean value) stack traceback: /usr/local/share/lua/5.1//fbclient/util.lua:147: in main chunk [C]: in function 'require' /usr/local/share/lua/5.1//fbclient/init.lua:19: in main chunk [C]: in function 'require' /usr/local/share/lua/5.1//fbclient/class.lua:138: in main chunk [C]: in function 'require' test.lua:10: in main chunk [C]: ?
Comment #1
Posted on Oct 1, 2011 by Happy Hippowhat does require('alien') return for you?
Comment #2
Posted on Oct 2, 2011 by Quick Horse$ lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
--alien test require 'alien' local buf = alien.buffer(100) print (buf) nil
looks like alien is installed. (Sorry, i'm a beginner of lua)
Comment #3
Posted on Oct 3, 2011 by Quick HorseThen i think that result is run-timing of init.lua, but i got messages as follows.
export LUA_PATH="/usr/local/share/lua/5.1/fbclient/?.lua;/usr/local/share/lua/5.1/fbclient/init.lua" lua test.lua lua: /usr/local/share/lua/5.1/fbclient/init.lua:18: loop or previous error loading module 'fbclient.package' stack traceback: [C]: in function 'require' /usr/local/share/lua/5.1/fbclient/init.lua:18: in main chunk [C]: in function 'require' /usr/local/share/lua/5.1/fbclient/init.lua:18: in main chunk [C]: in function 'require' test.lua:5: in main chunk [C]: ?
Comment #4
Posted on Oct 6, 2011 by Happy CamelI had the same problem but resolution is simple. Edit your alien.lua file (in my kubuntu it is located in /usr/local/share/lua/5.1/) as follows: at the end of file add this line:
return _M;
I hope it helps
Comment #5
Posted on Oct 7, 2011 by Quick HorseIt works. Thanks for your help.
Status: New
Labels:
Type-Defect
Priority-Medium