luarocks install lfs
What steps will reproduce the problem?
1.luarocks install lfs
2.or luarocks --local install lfs
What is the expected output? What do you see instead?
i see error lfs already exists.
What version of the product are you using? On what operating system?
LuaForWindows_v5.1.4-46, ms windows xp sp3, i386.
Please provide any additional information below.
luarock can't update lfs because luarocks use lfs. I think that better way move
luarocks in dependent dir with personal lua, lfs and etc. binaries.
Original issue reported on code.google.com by [email protected] on 2 Dec 2014 at 2:09
Is there any way to update luafilesystems?
Installing http://luarocks.org/repositories/rocks/luafilesystem-1.6.3-2.src.rock... cl /MD /O2 -c -Fosrc/lfs.obj -IC:/Programming/Lua/5.1/include src/lfs.c Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 Copyright (C) Microsoft Corporation. All rights reserved.
lfs.c link -dll -def:lfs.def -out:lfs.dll C:/Programming/Lua/5.1/lib/lua5.1.lib src/lfs.obj Microsoft (R) Incremental Linker Version 14.00.23506.0 Copyright (C) Microsoft Corporation. All rights reserved.
Creating library lfs.lib and object lfs.exp
Error: File already exists: C:\Programming\Lua\5.1\clibs/lfs.dll
I think it would be easiest to just remove C:\Programming\Lua\5.1\clibs/lfs.dll first before installing with LuaRocks.
I tried that already. One can't run luarocks without lfs.dll. This is what the original issue author meant by luarocks depending on luafilesystem I think
This is the error message when trying to install luafilesystem with clibs/lfs.dll removed
c:\Programming\Lua\5.1>luarocks install luafilesystem 'pwd' is not recognized as an internal or external command, operable program or batch file. C:\Programming\Lua\5.1\lua: ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools. lua:24: attempt to index local 'directory' (a nil value) stack traceback: ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:24: in function 'command_at' ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:125: in function <...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:124> (tail call): ? ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:147: in function 'make_dir' C:\Programming\Lua\5.1\lua\luarocks\command_line.lua:30: in function 'is _writable' C:\Programming\Lua\5.1\lua\luarocks\command_line.lua:76: in function 'ru n_command' C:\Programming\Lua\5.1\luarocks.lua:20: in main chunk [C]: ?
This feels like a LuaRocks issue. I have no experiance with that on Windows. I would ask the LuaRocks mailing list. https://lists.sourceforge.net/lists/listinfo/luarocks-developers
Sorry.
Are you running this from a Visual C++ command prompt? Or a minGW command prompt? That might be needed.
Sorry for the late response. Visual C++ command prompt. It's the Enterprise 2015 edition if that matters.
OK so I worked up a solution to update LuaRocks to a MUCH newer version. I am going to add the file to the download section of GitHub Steps:
- Install LuaForWindows
- In a temp location, unzip http://keplerproject.github.io/luarocks/releases/luarocks-2.2.2-win32.zip
- In same location, unzip the downloaded lfw_luarocks-2.2.2-win32.zip from GitHub project
- In same location, open a command prompt
- if you want to install rocks, make it a "Visual Studio Command Prompt"
- make sure LUA_DEV environment var set correctly
- will probably need to open command prompt as Administrator
- admin rights are typically need to write to "Program Files" 5) Run lfw_install.bat
- this "manually" installs 2.2.2 in the LfW directory 6) Optionally run lfw_update_rocks.bat
- this will try to install (get, compile, deploy) rocks for a lot of modules
- A LOT of these will fail
- it uses the "popular" list from https://luarocks.org/
- A FEW of these will fail
- in the end you should have 40-50 modules installed as "rocks"
- it does some cleanup of old stuff if new installed
Here is the link to the file. https://github.com/rjpcomputing/luaforwindows/releases/download/luarocks-update/lfw_luarocks-2.2.2-win32.7z
I moved to using https://github.com/Tieske/luawinmulti for the time being. It's minimal and I have full control of what gets installed. It also supports Lua 5.2 and 5.3.
I do appreciate your effort and will keep an eye on your project. Thank you very much