loverocks icon indicating copy to clipboard operation
loverocks copied to clipboard

module 'luarocks.cfg' not found

Open TangentFox opened this issue 7 years ago • 3 comments

I installed loverocks and attempted to create a new project (actually, I tried running it with --help and -h first to try to understand it better first), and I continually get the same error:

/usr/bin/lua5.1: /usr/local/share/lua/5.1/loverocks/unzip.lua:26: module 'luarocks.cfg' not found:No LuaRocks module found for luarocks.cfg
	no field package.preload['luarocks.cfg']
	no file '/usr/local/share/lua/5.1/luarocks/cfg.lua'
	no file '/usr/local/share/lua/5.1/luarocks/cfg/init.lua'
	no file './luarocks/cfg.lua'
	no file '/usr/local/lib/lua/5.1/luarocks/cfg.lua'
	no file '/usr/local/lib/lua/5.1/luarocks/cfg/init.lua'
	no file '/usr/share/lua/5.1/luarocks/cfg.lua'
	no file '/usr/share/lua/5.1/luarocks/cfg/init.lua'
	no file '/home/tangent/.luarocks/share/lua/5.1/luarocks/cfg.lua'
	no file '/home/tangent/.luarocks/share/lua/5.1/luarocks/cfg/init.lua'
	no file '/usr/local/lib/lua/5.1/luarocks/cfg.so'
	no file './luarocks/cfg.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/luarocks/cfg.so'
	no file '/usr/lib/lua/5.1/luarocks/cfg.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file '/home/tangent/.luarocks/lib/lua/5.1/luarocks/cfg.so'
	no file '/usr/local/lib/lua/5.1/luarocks.so'
	no file './luarocks.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/luarocks.so'
	no file '/usr/lib/lua/5.1/luarocks.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file '/home/tangent/.luarocks/lib/lua/5.1/luarocks.so'
stack traceback:
	[C]: in function 'require'
	/usr/local/share/lua/5.1/loverocks/unzip.lua:26: in main chunk
	[C]: in function 'require'
	/usr/local/share/lua/5.1/loverocks/loadconf.lua:13: in main chunk
	[C]: in function 'require'
	/usr/local/share/lua/5.1/loverocks/love-versions.lua:1: in main chunk
	[C]: in function 'require'
	/usr/local/share/lua/5.1/loverocks/commands/new.lua:4: in main chunk
	[C]: in function 'require'
	/usr/local/share/lua/5.1/loverocks/commands.lua:19: in main chunk
	[C]: in function 'require'
	/usr/local/share/lua/5.1/loverocks/main.lua:2: in main chunk
	[C]: in function 'require'
	...b/luarocks/rocks-5.1/loverocks/0.2.1-1/bin/loverocks:2: in main chunk
	[C]: ?

TangentFox avatar Aug 24 '18 02:08 TangentFox

hmm, it looks like since I last updated luarocks released a major version. I'm not sure how much work it'll be to fix all the places where we directly hook into luarocks but I'll try to get to it sometime soon: in the meantime though things won't work :(

Alloyed avatar Aug 24 '18 02:08 Alloyed

same here. I am using msys2 + mingw64 on windows7, all lua and luarocks are installed by command like

pacman -S mingw-w64-x86_64-lua

there is no error message during installation but when I run

$ luarocks install iuplua
E:\msys64\mingw64\bin\lua.exe: E:/msys64/mingw64/bin/luarocks:5: module 'luarocks.cfg' not found:
        no field package.preload['luarocks.cfg']
        no file '/mingw64/share/lua/5.1/luarocks\cfg.lua'
        no file 'E:\msys64\mingw64\bin\lua\luarocks\cfg.lua'
        no file 'E:\msys64\mingw64\bin\lua\luarocks\cfg\init.lua'
        no file 'E:\msys64\mingw64\bin\luarocks\cfg.lua'
        no file 'E:\msys64\mingw64\bin\luarocks\cfg\init.lua'
        no file 'E:\msys64\mingw64\bin\..\share\lua\5.3\luarocks\cfg.lua'
        no file 'E:\msys64\mingw64\bin\..\share\lua\5.3\luarocks\cfg\init.lua'
        no file '.\luarocks\cfg.lua'
        no file '.\luarocks\cfg\init.lua'
        no file 'E:\msys64\mingw64\bin\luarocks\cfg.dll'
        no file 'E:\msys64\mingw64\bin\..\lib\lua\5.3\luarocks\cfg.dll'
        no file 'E:\msys64\mingw64\bin\loadall.dll'
        no file '.\luarocks\cfg.dll'
        no file 'E:\msys64\mingw64\bin\luarocks.dll'
        no file 'E:\msys64\mingw64\bin\..\lib\lua\5.3\luarocks.dll'
        no file 'E:\msys64\mingw64\bin\loadall.dll'
        no file '.\luarocks.dll'
stack traceback:
        [C]: in function 'require'
        E:/msys64/mingw64/bin/luarocks:5: in main chunk
        [C]: in ?

retsyo avatar Jan 23 '19 02:01 retsyo

Same problem on mac 12.4:

brew reinstall [email protected]
brew install luarocks
luarocks --lua-dir=/opt/homebrew/opt/[email protected] install busted
luarocks --lua-dir=/opt/homebrew/opt/[email protected] install luarocks
luarocks --lua-dir=/opt/homebrew/opt/[email protected] install loverocks

loverocks help

/opt/homebrew/opt/[email protected]/bin/lua5.1: ...konsumer/.luarocks/share/lua/5.1/loverocks/unzip.lua:26: module 'luarocks.cfg' not found:No LuaRocks module found for luarocks.cfg
	no field package.preload['luarocks.cfg']
	no file '/Users/konsumer/.luarocks/share/lua/5.1/luarocks/cfg.lua'
	no file '/Users/konsumer/.luarocks/share/lua/5.1/luarocks/cfg/init.lua'
	no file 'luarocks/cfg'
	no file 'luarocks/cfg.lua'
	no file './luarocks/cfg.lua'
	no file '/opt/homebrew/share/lua/5.1/luarocks/cfg.lua'
	no file '/opt/homebrew/share/lua/5.1/luarocks/cfg/init.lua'
	no file '/opt/homebrew/lib/lua/5.1/luarocks/cfg.lua'
	no file '/opt/homebrew/lib/lua/5.1/luarocks/cfg/init.lua'
	no file '/Users/konsumer/.luarocks/lib/lua/5.1/luarocks/cfg.so'
	no file '/usr/local/lib/lua/5.1/luarocks/cfg.so'
	no file './luarocks/cfg.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/luarocks/cfg.so'
	no file '/usr/lib/lua/5.1/luarocks/cfg.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file '/Users/konsumer/.luarocks/lib/lua/5.1/luarocks.so'
	no file '/usr/local/lib/lua/5.1/luarocks.so'
	no file './luarocks.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/luarocks.so'
	no file '/usr/lib/lua/5.1/luarocks.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'require'
	...konsumer/.luarocks/share/lua/5.1/loverocks/unzip.lua:26: in main chunk
	[C]: in function 'require'
	...sumer/.luarocks/share/lua/5.1/loverocks/loadconf.lua:13: in main chunk
	[C]: in function 'require'
	.../.luarocks/share/lua/5.1/loverocks/love-versions.lua:1: in main chunk
	[C]: in function 'require'
	...r/.luarocks/share/lua/5.1/loverocks/commands/new.lua:4: in main chunk
	[C]: in function 'require'
	...sumer/.luarocks/share/lua/5.1/loverocks/commands.lua:19: in main chunk
	[C]: in function 'require'
	.../konsumer/.luarocks/share/lua/5.1/loverocks/main.lua:2: in main chunk
	[C]: in function 'require'
	...b/luarocks/rocks-5.1/loverocks/0.2.1-1/bin/loverocks:2: in main chunk
	[C]: ?

konsumer avatar Jun 11 '22 23:06 konsumer