Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problem #162

Closed
gelnior opened this issue Sep 13, 2014 · 7 comments
Closed

Installation problem #162

gelnior opened this issue Sep 13, 2014 · 7 comments

Comments

@gelnior
Copy link

gelnior commented Sep 13, 2014

Hello,

On Ubuntu 14.04, I installed Lua 5.2 and luarocks via apt-get. After installing Moonscript via luarocks, I run into the following error when I use the moonc command:

/usr/bin/lua: /usr/share/lua/5.1//luarocks/loader.lua:113: error loading module 'lfs' from file '/usr/local/lib/lua/5.1/lfs.so':
    /usr/local/lib/lua/5.1/lfs.so: undefined symbol: luaL_register
stack traceback:
    [C]: in function 'loader'
    /usr/share/lua/5.1//luarocks/loader.lua:113: in function </usr/share/lua/5.1//luarocks/loader.lua:110>
    (...tail calls...)
    [C]: in function 'require'
    /usr/local/lib/luarocks/

Do you have any idea of what I did wrong?

I like coding in Coffeescript, so I think Moonscript is a great idea for Lua.

@andyl
Copy link

andyl commented Jan 20, 2015

I have the same problem.

@suchipi
Copy link

suchipi commented May 7, 2015

Make sure you are using the lua5.1 package instead of the lua5.2 package. Try:

sudo apt-get install lua5.1
sudo apt-get remove lua5.2

You should see a message from update-alternatives noting that it will use lua5.1 and luac5.1.

@gelnior
Copy link
Author

gelnior commented May 14, 2015

Ok. Thank you @suchipi.

@pablo-grande
Copy link

Had the same problem. Good solution.

@ErikUggeldahl
Copy link

Same here, with a slightly different error:

/usr/bin/lua: /usr/share/lua/5.1//luarocks/loader.lua:113: error loading module 'lpeg' from file '/usr/local/lib/lua/5.1/lpeg.so':
    /usr/local/lib/lua/5.1/lpeg.so: undefined symbol: lua_tointeger

Thanks for the fix.

@leafo
Copy link
Owner

leafo commented Dec 27, 2015

MoonScript should work fine on all versions of Lua. It seems like there's a luarocks environment problem, it's trying to use modules compiled for another version of Lua.

@RyanSquared
Copy link
Contributor

@gelnior @leafo can someone close this?

@gelnior gelnior closed this as completed Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants