lua-users home
lua-l archive

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

On Thu, Jun 18, 2009 at 1:01 PM, Wesley Smith<> wrote:
> Out of curiosity, what is the current state of LuaRocks on Linux?

Well, it works. :-) The current release 1.0, installs through a
typical "./configure && make && make install" procedure.

  tar zxvpf lua-5.1.4.tar.gz
  cd lua-5.1.4
  make linux
  make install
  tar zxvpf luarocks-1.0.1.tar.gz
  cd luarocks-1.0.1
  make install

By default it installs itself in /usr/local, same as Lua, but you can
change it with --prefix in configure.

  export PATH=$PATH:/usr/local/bin
  luarocks build luasocket

Once installed, rocks built go into /usr/local/lib/luarocks/rocks.

  find /usr/local/lib/luarocks

They can be required by a Lua interpreted that loads the
luarocks.require module (luarocks.require installs by default under
/usr/local/share/lua/5.1, the vanilla location).

  lua -lluarocks.require -e "require 'socket'; print(socket._VERSION)"

(BTW, this sequence of commands works on Mac OSX too, changing the
'wget' lines to the 'curl' equivalent, and 'make linux' to 'make

The main change for LuaRocks 2.0 will be that modules installed from
rocks will go, in a default installation, to the vanilla Lua location,
/usr/local/{share,lib}/lua/5.1 (this will of course be configurable),
which will allow the standard module loader to find them, removing the
need to add that flag -lluarocks.require from the 'lua' call.

-- Hisham