【问题标题】:Trouble running luarocks 2.2.0 in Windows - 'pwd' not recognized在 Windows 中运行 luarocks 2.2.0 时出现问题 - 'pwd' 无法识别
【发布时间】:2014-12-22 00:45:48
【问题描述】:

我在 64 位 Windows 7 中安装了 luarocks,并且一切都安装正确,但是当我尝试运行 luarocks 时出现以下错误:

'pwd' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Lua\5.1\lua: ... Files (x86)\Lua\5.1\lua/luarocks\fs\win3
2\tools.lua:24: attempt to index local 'directory' (a nil value)
stack traceback:
        ... Files (x86)\Lua\5.1\lua/luarocks\fs\win32\tools.lua:24: in function
'command_at'
        ... Files (x86)\Lua\5.1\lua/luarocks\fs\win32\tools.lua:125: in function
 <... Files (x86)\Lua\5.1\lua/luarocks\fs\win32\tools.lua:124>
        (tail call): ?
        ... Files (x86)\Lua\5.1\lua/luarocks\fs\win32\tools.lua:147: in function
 'make_dir'
        ...am Files (x86)\Lua\5.1\lua\luarocks\command_line.lua:30: in function
'is_writable'
        ...am Files (x86)\Lua\5.1\lua\luarocks\command_line.lua:76: in function
'run_command'
        C:\Program Files (x86)\Lua\5.1\luarocks.lua:20: in main chunk
        [C]: ?
'"lua5.1"' is not recognized as an internal or external command,
operable program or batch file.

我真的不知道我做错了什么,我在网上搜索了答案,但一无所获。

【问题讨论】:

  • pwd 是类 Unix 操作系统上的常用程序。您似乎使用的是专为 Linux 设计的代码,但您使用的是 Windows。
  • 好吧,我运行的是 Windows 版本,我没有运行任何特殊代码。当我在命令行中键入 luarocks 而不指定任何文件或选项时出现此错误,并且它是 win32 版本(我只是仔细检查了)。我会尝试将其删除并重新安装以确保安全。
  • Windows 上的 LuaRocks 提供了一个 pwd 二进制文件。它应该在tools 目录中的某个位置。你的 LuaRocks 模块的文件路径看起来不对——应该有版本 (2.2) 在某处......
  • 谢谢。我在路径中添加了工具,它找到了密码。现在我在让它工作时遇到了其他问题。

标签: windows lua luarocks


【解决方案1】:

我将工具目录添加到我的 Windows 路径变量中,这解决了问题。由于其他原因,我仍然无法让 luarocks 工作,但我将在单独的问题中发布这些问题。

【讨论】:

    猜你喜欢
    • 2019-02-01
    • 2016-09-26
    • 1970-01-01
    • 2023-01-31
    • 1970-01-01
    • 2011-07-16
    • 2018-10-31
    • 2011-09-29
    • 1970-01-01
    相关资源
    最近更新 更多