1
votes

I've been having difficulties getting luarocks to work in Windows 7. Whenever I run luarocks, I get the following error:

lua5.1: cannot open C:\Program Files (x86)\Lua\luarocks.lua: No such file or directory

Now, checking the folders, it is indeed the case that luarocks.lua is not in C:\Program Files (x86)\Lua, but in C:\Program Files (x86)\Lua\5.1. I don't know where or what file I have to change to get that to work. I installed with the /MW /L /F options in case that matters, but I've had the same problem installing without options. The documentation has not been much help, and I've set all my path variables correctly, in accordance with the text dump at the end of the install. I got no errors during the install. I installed the latest version of luarocks, 2.2.0.

1

1 Answers

0
votes

The full path to luarocks.lua is written into the generated luarocks.bat by the installation script. You could change it there, but it looks like your LuaRocks installation is seriously broken: luarocks.lua should not be in C:\Program Files (x86)\Lua\5.1 but in C:\Program Files (x86)\LuaRocks\2.2, next to luarocks.bat. (The LuaRocks version number, 2.2 in this case, is appended to the install location automatically by the installation script, so I have no idea how you could end up with a path like yours.) You will most likely run into more problems along the way. This is also the reason why your bundled tools could not be found before.

It could be something simple like another failed installation attempt that interferes because of leftover environment variable settings, but I suggest you show up on the LuaRocks mailing list (also accessible as a newsgroup), and post your solution here at SO once the underlying problem is resolved.