lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Il giorno mer, 15/08/2018 alle 13.51 +0200, Bernd Eggink ha scritto:
> ...
> LUA_PATH="/home/soft/luarocks/luarocks-3.0.1/src/?.lua;;" exec 
> "/usr/local/bin/lua" 
> "/home/soft/luarocks/luarocks-3.0.1/src/bin/luarocks" 
> --project-tree="/home/soft/luarocks/luarocks-3.0.1/lua_modules" "$@"' >> 
> luarocks
> chmod +rx ./luarocks
> ./luarocks init
> /usr/local/bin/lua: 
> /home/soft/luarocks/luarocks-3.0.1/src/bin/luarocks:7: module 
> 'luarocks.cmd' not found:No LuaRocks module found for luarocks.cmd
> 	no field package.preload['luarocks.cmd']
> 	no file './luarocks/cmd.lua'
> 	no file '/home/bernd/lua/lib/luarocks/cmd.lua'
> ...

Hi Bernd,

are you sure the above is an unmodified copy&paste? Because the defined
LUA_PATH does not match the Lua output. Just to be on the safe side, I
would `export LUA_PATH=...` before the `exec` call instead.

> ...
> There is no cmd.lua or in my file system.
> What am I missing?
> ...

`cmd.lua` is present in the tarball at `luarocks-3.0.1/src/luarocks/`.
You must update your LUA_PATH accordingly and fix what is wrong on your
side (i.e. the method you use for looking up files or how you ended up
with a corrupt `luarocks-3.0.1` folder).