【发布时间】:2017-05-10 20:04:54
【问题描述】:
我正在尝试安装从luarocks's official site 获得的最新版本的 Luarocks。首先,我使用了从 LuaForge Lua Binaries project 获得的 Lua 二进制文件,这些文件是从 Official Lua site 引用的。但是安装脚本返回以下错误(由于堆栈溢出限制导致输出拖尾):
LuaRocks 2.4.x installer.
========================
== Checking system... ==
========================
Admin privileges available for installing
Looking for Lua interpreter
checking C:\Programs\Lua
Found lua.exe, testing it...
Interpreter found, now looking for link libraries...
checking for C:\Programs\Lua\lua5.3.lib
checking for C:\Programs\Lua\lua53.lib
checking for C:\Programs\Lua\lua5.3.dll
checking for C:\Programs\Lua\lua53.dll
Found lua53.dll
....................................................
Could not find Lua. See /? for options for specifying the location of Lua, or installing a bundled copy of Lua 5.1.
Failed installing LuaRocks. Run with /? for help.
然后我使用了另一个从 Lua - joedf's Builds 获得的 Lua 二进制文件,这些文件是从 Official Lua site 引用的。但是安装脚本返回以下错误(由于堆栈溢出限制导致输出拖尾):
LuaRocks 2.4.x installer.
========================
== Checking system... ==
========================
Admin privileges available for installing
Looking for Lua interpreter
checking C:\Programs\Lua
Found lua53.exe, testing it...
Interpreter found, now looking for link libraries...
checking for C:\Programs\Lua\lua5.3.lib
checking for C:\Programs\Lua\lua53.lib
checking for C:\Programs\Lua\lua5.3.dll
checking for C:\Programs\Lua\lua53.dll
Found lua53.dll
Link library found, now looking for headers...
checking for C:\Programs\Lua\include\lua\5.3\lua.h
checking for C:\Programs\Lua\include\lua53\lua.h
checking for C:\Programs\Lua\include\lua5.3\lua.h
checking for C:\Programs\Lua\include\lua.h
checking for C:\Programs\Lua\lua.h
checking C:\Windows\system32\inetsrv
Found lua53.exe, testing it...
Interpreter found, now looking for link libraries...
checking for C:\Programs\Lua\lua5.3.lib
checking for C:\Programs\Lua\lua53.lib
checking for C:\Programs\Lua\lua5.3.dll
checking for C:\Programs\Lua\lua53.dll
Found lua53.dll
......................................................
Could not find Lua. See /? for options for specifying the location of Lua, or installing a bundled copy of Lua 5.1.
Failed installing LuaRocks. Run with /? for help.
然后我使用了另一个从 LuaDist 获得的 Lua 二进制文件,这些文件是从 official Lua site 引用的。它已经包含 luarocks,但版本较旧。使用此版本会导致以下错误:Orbit Installation Using Luarocks in Windows。所以,尝试安装 luarocks 的脚本。安装成功,我按照安装程序指令配置了以下变量(由于堆栈溢出限制导致拖尾输出):
............................................................
============================
== LuaRocks is installed! ==
============================
You may want to add the following elements to your paths;
Lua interpreter;
PATH : C:\Programs\Binaries-LuaDist-batteries-0.9.8-Windows-x86\bin
PATHEXT : .LUA
LuaRocks;
PATH : C:\Program Files (x86)\LuaRocks
LUA_PATH : C:\Program Files (x86)\LuaRocks\lua\?.lua;C:\Program Files (x86)\LuaRocks\lua\?\init.lua
Local user rocktree (Note: %APPDATA% is user dependent);
PATH : %APPDATA%\LuaRocks\bin
LUA_PATH : %APPDATA%\LuaRocks\share\lua\5.1\?.lua;%APPDATA%\LuaRocks\share\lua\5.1\?\init.lua
LUA_CPATH: %APPDATA%\LuaRocks\lib\lua\5.1\?.dll
System rocktree
PATH : c:\programs\binaries-luadist-batteries-0.9.8-windows-x86\\bin
LUA_PATH : c:\programs\binaries-luadist-batteries-0.9.8-windows-x86\\share\lua\5.1\?.lua;c:\programs\binaries-luadist-batteries-0.9.8-windows-x86\\share\lua\5.1\?\init.lua
LUA_CPATH: c:\programs\binaries-luadist-batteries-0.9.8-windows-x86\\lib\lua\5.1\?.dll
Note that the %APPDATA% element in the paths above is user specific and it MUST
be replaced by its actual value.
For the current user that value is: C:\Users\Banee-Ishaque-K\AppData\Roaming.
但 luarocks 命令现在返回
windows 无法打开此文件
错误,怎么办?我正在使用 Windows 7 64 位,并且没有用于 Windows 的编译方法来手动编译 Lua 而不是使用二进制文件。
【问题讨论】:
-
我试过 training-course-material.com/images/1/11/… 。但是,运气不好。
-
看来修剪后的输出缺少关键部分,这些部分显示了究竟是什么不起作用。您能否链接到完整的输出,或者将它们粘贴到gist.github.com 等服务中?
-
这是您要求的要点@ Hisham H M:gist.github.com/Baneeishaque/32281d9222c036075ce0158314ea0f17
-
@HishamHM 看起来 luarock 检测没有找到
lua.h。如果该要点的长度和内容是正确的,那么看起来整个系统中到处都有多个 lua 解释器/运行时。我建议删除所有这些并清理干净。有一个 lua 位置,岩石可以可靠地找到它。 -
还有什么 C 编译器你有设置?您使用的是 mingw 还是 msvc (
cl.exe)?