lua-users home
lua-l archive

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


On Wed, Jul 15, 2009 at 12:25 PM, michel<compukat@videotron.ca> wrote:
> I am trying to install LUA on a Linux  server with no success because it
> tries to create directories in /usr and I am on  shared server with no root
> privileges. I figure I could fix it with configure --prefix but when I run
> configure from the directory where I opened lua-5.1.4.tar.gz I am told 'No
> such file or directory'.

There is a 'local' install option, but you will have to set
environment variables LUA_PATH (and later, LUA_CPATH) so that your Lua
will be able to find modules.  The executable ends up in the src
directory, you can copy this anywhere on your path.

$ export LUA_PATH=';;/home/sdonovan/projects/lua/lua/?.lua;/home/sdonovan/projects/lua/lua/?/init.lua'
$ lua
Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
> print(package.path)
;./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua;/home/sdonovan/projects/lua/lua/?.lua;/home/sdonovan/projects/lua/lua/?/init.lua

So you can put your own directories into package.path (the ;; expands
to the existing one).

steve d.