Luarocks 安装 [英] Luarocks Installation

查看:14
本文介绍了Luarocks 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装从 luarocks 官方网站获得的最新版本的 Luarocks.首先,我使用了从 Lua 官方网站.但是安装脚本返回以下错误(由于堆栈溢出限制而导致输出尾随):

I am trying to install the latest version of Luarocks, obtained from luarocks's official site. Firstly, I used the Lua binaries obtained from LuaForge Lua Binaries project referred from Official Lua site. But the install script returns the following error (trailed output because of stack overflow restrictions) :

LuaRocks 2.4.x installer.

========================
== Checking system... ==
========================

Admin privileges available for installing
Looking for Lua interpreter
    checking C:ProgramsLua
       Found lua.exe, testing it...
Interpreter found, now looking for link libraries...
    checking for C:ProgramsLualua5.3.lib
    checking for C:ProgramsLualua53.lib
    checking for C:ProgramsLualua5.3.dll
    checking for C:ProgramsLualua53.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 二进制文件,引用自 Lua 官方网站.但是安装脚本返回以下错误(由于堆栈溢出限制而导致输出尾随):

Then I used another Lua binaries obtained from Lua - joedf's Builds referred from Official Lua site. But the install script returns the following error (trailed output because of stack overflow restrictions) :

LuaRocks 2.4.x installer.

========================
== Checking system... ==
========================

Admin privileges available for installing
Looking for Lua interpreter
    checking C:ProgramsLua
       Found lua53.exe, testing it...
Interpreter found, now looking for link libraries...
    checking for C:ProgramsLualua5.3.lib
    checking for C:ProgramsLualua53.lib
    checking for C:ProgramsLualua5.3.dll
    checking for C:ProgramsLualua53.dll
       Found lua53.dll
Link library found, now looking for headers...
    checking for C:ProgramsLuaincludelua5.3lua.h
    checking for C:ProgramsLuaincludelua53lua.h
    checking for C:ProgramsLuaincludelua5.3lua.h
    checking for C:ProgramsLuaincludelua.h
    checking for C:ProgramsLualua.h
    checking C:Windowssystem32inetsrv
       Found lua53.exe, testing it...
Interpreter found, now looking for link libraries...
    checking for C:ProgramsLualua5.3.lib
    checking for C:ProgramsLualua53.lib
    checking for C:ProgramsLualua5.3.dll
    checking for C:ProgramsLualua53.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 网站.它已经包含 luarocks,但版本较旧.使用此版本会导致以下错误:在 Windows 中使用 Luarocks 进行 Orbit 安装.因此,尝试安装 luarocks 脚本.安装成功,我按照安装程序的说明配置了以下变量(由于堆栈溢出限制,尾随输出):

Then I used another Lua binaries obtained from LuaDist referred from official Lua site. It already includes luarocks, but an older version. Using this version results the following error : Orbit Installation Using Luarocks in Windows. So, tried install script of luarocks. The installation is successful, and I configured the following variables according to the installer instruction (trailed output because of stack overflow restrictions) :

............................................................ 
============================
== LuaRocks is installed! ==
============================

You may want to add the following elements to your paths;
Lua interpreter;
  PATH     :   C:ProgramsBinaries-LuaDist-batteries-0.9.8-Windows-x86in
  PATHEXT  :   .LUA
LuaRocks;
  PATH     :   C:Program Files (x86)LuaRocks
  LUA_PATH :   C:Program Files (x86)LuaRockslua?.lua;C:Program Files (x86)LuaRockslua?init.lua
Local user rocktree (Note: %APPDATA% is user dependent);
  PATH     :   %APPDATA%LuaRocksin
  LUA_PATH :   %APPDATA%LuaRockssharelua5.1?.lua;%APPDATA%LuaRockssharelua5.1?init.lua
  LUA_CPATH:   %APPDATA%LuaRocksliblua5.1?.dll
System rocktree
  PATH     :   c:programsinaries-luadist-batteries-0.9.8-windows-x86\bin
  LUA_PATH :   c:programsinaries-luadist-batteries-0.9.8-windows-x86\sharelua5.1?.lua;c:programsinaries-luadist-batteries-0.9.8-windows-x86\sharelua5.1?init.lua
  LUA_CPATH:   c:programsinaries-luadist-batteries-0.9.8-windows-x86\liblua5.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:UsersBanee-Ishaque-KAppDataRoaming.

但是 luarocks 命令现在返回

But luarocks command now returns

windows 无法打开这个文件

windows can't open this file

错误,怎么办?我正在使用 Windows 7 64 位,并且没有用于手动编译 Lua 而不是使用二进制文件的 Windows 编译方法.

error, what will do? I am working on Windows 7 64 bit and there is no compilation method for Windows for manual compilation of Lua instead of using binaries.

推荐答案

解决方案是,只需使用 CMD 行参数/LUA 将 Lua 安装目录指定到 Luarocks 安装脚本(INSTALL.bat)文件即可.在上述情况下,

The Solution is, just specify the Lua installation directory to Luarocks Installation script(INSTALL.bat) file using CMD line argument /LUA. In the above case,

C:Programsluarocks-2.4.2-win32>install.bat /LUA C:ProgramsBinaries-LuaDist-batteries-0.9.8-Windows-x86 

将成功安装 Luarocks.经过测试&在 Win 7 64 位和 Lua 5.1 64 位以及 Luarocks 2.4.2 win32 包上验证.

will install Luarocks successfully. Tested & Verified on Win 7 64 bit with Lua 5.1 64 bit along with Luarocks 2.4.2 win32 package.

安装Luarocks;Lua 解释器、链接库、头文件运行时必须存在于系统中. 来自 LuaForge Lua Binaries 项目 的二进制文件 &Lua - joedf's Builds 只包含 Lua 解释器 &链接库.这就是前两种方法失败并出现错误的原因.

To Install Luarocks; Lua interpreter,link libraries,headers & runtime must be present in the system. The binaries from LuaForge Lua Binaries project & Lua - joedf's Builds only contains Lua interpreter & link libraries. That's why the first two methods failed with errors.

LuaDist 获得的 Lua 二进制文件包含 Lua 解释器、链接库和标题;运行时将在大多数用于开发目的的 Windows 系统中可用(如果没有,我们可以安装匹配的(用于将 Lua 源代码编译为二进制的版本)Microsoft Visual C++ Redistributables from Microsoft 网站).但是,问题是 ..Binaries-LuaDist-batteries-0.9.8-Windows-x86in 在路径中.该文件夹仅包含 Lua 解释器.链接库标头位于 ..Binaries-LuaDist-batteries-0.9.8-Windows-x86 文件夹中.

Lua binaries obtained from LuaDist contains Lua interpreter,link libraries & headers; The runtime will be available in most windows systems used for development purpose (if not, we can install matching ( version that is used to compile Lua source to binary) Microsoft Visual C++ Redistributables from Microsoft website). But, the problem is ..Binaries-LuaDist-batteries-0.9.8-Windows-x86in is in path. the folder contains only Lua interpreter. link libraries & headers are in ..Binaries-LuaDist-batteries-0.9.8-Windows-x86 folder.

这篇关于Luarocks 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆