简体   繁体   English

如何为 Windows 10 安装 luarocks

[英]How to install luarocks for Windows 10

So I've been searching everywhere and I'm completely stuck right now.所以我一直在到处寻找,现在我完全被困住了。 Initially I just installed the binaries which came with luarocks.exe and luarocks_admin.exe but with that there was no config file so when I go to install the luarocks-mysql module, luarocks was unable to find the lua library and said I needed to set the LUA_LIBDIR variable in the config.最初我只安装了 luarocks.exe 和 luarocks_admin.exe 附带的二进制文件,但是没有配置文件,所以当我去安装 luarocks-mysql 模块时,luarocks 无法找到 lua 库并说我需要设置配置中的 LUA_LIBDIR 变量。 I can't make changes to the luarocks config though because it either doesn't exist or I can't find it.我无法更改 luarocks 配置,因为它要么不存在,要么找不到。

After getting this problem I went back to install the luarocks all in one package but I'm unable to follow the instructions because I can't find the install.bat file that they were talking about.遇到这个问题后,我回去将 luarocks 全部安装在一个包中,但我无法按照说明进行操作,因为我找不到他们正在谈论的 install.bat 文件。 Sorry if this is a lot but I'm just running into a bunch of problems right now.对不起,如果这是很多,但我现在只是遇到了一堆问题。

EDIT: Just use Ubuntu, it's 100 times easier.编辑:只需使用 Ubuntu,它就简单 100 倍。

I had similar problems.我有类似的问题。 I didn't look for a solution and just installed wsl on windows 10.我没有寻找解决方案,只是在 Windows 10 上安装了 wsl。

https://docs.microsoft.com/en-us/windows/wsl/install https://docs.microsoft.com/en-us/windows/wsl/install

Then execute the commands in the console:然后在控制台执行命令:

sudo apt install lua5.3 liblua5.3-0 liblua5.3-dev

sudo apt install luarocks

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM