问题
I installed luarocks in 64-bit Windows 7, and everything installed correctly, but when I try to run luarocks I get the following error:
'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.
I'm really not sure what I'm doing wrong and I've scoured the internet for answers and turned up nothing.
回答1:
I added the tools directory to my Windows Path variable and this resolved the issue. I am still having trouble getting luarocks to work for other reasons, but I will post those issues in a separate question.
来源:https://stackoverflow.com/questions/26577400/trouble-running-luarocks-2-2-0-in-windows-pwd-not-recognized