lupa icon indicating copy to clipboard operation
lupa copied to clipboard

How to specify the lua version

Open lujinda opened this issue 9 years ago • 1 comments

Hi, My lua version is 5.2.But when I execute lua.require('socket'), out :

LuaError: module 'socket' not found:
    no field package.preload['socket']
    no file './socket.lua'
    no file '/usr/share/luajit-2.0.0-beta9/socket.lua'
    no file '/usr/local/share/lua/5.1/socket.lua'
    no file '/usr/local/share/lua/5.1/socket/init.lua'
    no file '/usr/share/lua/5.1/socket.lua'
    no file '/usr/share/lua/5.1/socket/init.lua'
    no file './socket.so'
    no file '/usr/local/lib/lua/5.1/socket.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.1/socket.so'
    no file '/usr/lib/lua/5.1/socket.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'

And lua.globals()._VERSION is Lua 5.1

lujinda avatar Dec 02 '15 06:12 lujinda

it looks like you've built lupa for LuaJIT. Try installing lupa with --no-luajit (python setup.py install --no-luajit); if Lua 5.2 development packages are set up correctly lupa should pick them.

kmike avatar Jan 16 '16 11:01 kmike