Unix Installation
After downloading the files for your system you'll probably have two files named
lua-5.1_XXXXX.tar.gz
- contains the library and includes for developerslua-5.1_XXXXX_bin.tar.gz
- contains the executables for end users
where XXXXX is a reference to your Operating System. Check the LuaBinaries Packaging documentation for more details on which files you should get.
Those files have to be expanded and their contents copied to the places shown below.
The common installation assumes the following directory structure (shown with the various LuaBinaries files needed).
$SYS_BINDIR (System executables, usually in /usr/bin) lua5.1 luac5.1 bin2c5.1 $SYS_LIBDIR (System libraries, usually in /usr/lib) liblua5.1.so liblua5.1.a $LUA_INC (Lua include files, usually in /usr/include/lua5.1) lauxlib.h lua.h lua.hpp luaconf.h lualib.h
Make sure that the files on $SYS_BINDIR
have execution permission
and that $SYS_LIBDIR
is in your system PATH. You may want to add
$SYS_BINDIR
to your system PATH too, but that is optional.
If you do not install in the common directory structure then you will have to:
- add the
$SYS_BINDIR
directory to your system PATH, so the executables can be found - add the
$SYS_LIBDIR
directory to your LD_LIBRARY_PATH, so you can use the dynamic library - add
"-L$(SYS_LIBDIR)"
to the linker parameters in your makefile, so the libraries can be found - add
"-I$(LUA_INC)"
to the compiler parameters in your makefile, so the includes can be found