-
Notifications
You must be signed in to change notification settings - Fork 14
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
Specify Lua version to install in testing docs #17
Comments
I have lua
@clorl do you think this is related to the same thing? |
Yes, this is the exact same error. So first busted.runner isn't found because you have to set the LUA_PATH and LUA_CPATH. Add this to your .bashrc, .zshrc or wherever. eval "$(luarocks path)" This will automatically set those variables. Ofc you can just run them, but you will have to do it everytime you want to run luarocks test. Now rerun the test command, you should get a different error. Here are example commands for Debian which is what I use, you have to change them to fit your package manager. Here is a simple command to find related lua files. # This should list lua related files in /usr/share lib and include
# It removes errors
find /usr/{share,lib,include} -name "*lua*" 2>/dev/null I'd advise against directly piping this into rm, you may have programs who have an embedded lua version, make sure you only delete the ones installed by lua package. sudo -s # Become root
alias rm='rm -i' # Always ask for confirmation
# Then do your thing Once it's done, install the following packages (names may vary depending on your distro)
And now your tests should work fine! Note: I don't know if manually deleting lua related files is necessary or safe. I'm pretty sure it is, especially the /usr/include file which is the one luarocks shared objects use. Maybe using |
@clorl this is profoundly helpful - I'd given up on getting this to work. Thank you so much! |
Spent a whole lot of time banging my head on why testing errored. This is because you need to install Lua 5.1 system-wide even if in the end you use nlua to make neovim your interpreter. This is because when luarocks installs some rocks, it may compile some of them to shared objects against the lua version you have installed globally on your system. This means that if you have luarocks + lua > 5.1 on your system, buster can't even run.
The error I got was on pl/path.lua where it couldn't require luafilesystem, even though the .so file was present. lfs.so failed because it was using undefined symbols that aren't available in Lua 5.1.
The text was updated successfully, but these errors were encountered: