Datasheet
You’re now ready to install the Lua executables, static library, header files, and manual pages. To do so,
execute the following command:
make install
Then execute the following command to return to your nonroot session:
exit
The following command should present the lua manual page:
man lua
You can scroll up and down through the document by using the standard navigation keys. Press Q to
return to the shell itself.
Now enter following command:
lua -v
This should present you with a version statement like the following:
Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
Any problem at this point indicates an issue that you can clarify with the following which command:
which lua
The response should be a line like this:
/usr/local/bin/lua
A response like the following means that lua was installed into a directory that is not in your search path,
which is an ordered list of directories that the operating system examines to resolve external commands:
which: no lua in (/usr/local/bin:/usr/bin)
You can remedy this by editing the PATH variable in your shell startup script to include the directory in
which
lua and luac were installed. You need to exit and restart the shell for these changes to take effect.
If you don’t have root privileges or simply want to test the installation locally, you can execute the fol-
lowing command:
make local
This creates several additional directories such as bin and man beneath the current directory.
11
Chapter 1: Getting Situated
04_069172 ch01.qxp 1/2/07 7:53 PM Page 11