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<wesley.hoke@gmail.com> 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.

  wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
  tar zxvpf lua-5.1.4.tar.gz
  cd lua-5.1.4
  make linux
  make install
  wget http://luaforge.net/frs/download.php/3981/luarocks-1.0.1.tar.gz
  tar zxvpf luarocks-1.0.1.tar.gz
  cd luarocks-1.0.1
  ./configure
  make
  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
macosx'.)

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