lua-users home
lua-l archive

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


On 7/5/07, Mason Deaver <mc.deaver@gmail.com> wrote:
Greetings from a new member of the lua list.  I'm in the process of
learning the language.

Dell recently started selling laptops and desktops with Ubuntu 7.04
installed (rather than Windows).  I bought one and am using it to
learn lua.

Lua did not build correctly out of the box on this computer -- not
lua's fault, but due to an incomplete installation of the GNU compiler
collection.

In case anyone else tries building lua on a Dell Ubuntu computer, I'm
writing the steps you'll need to take to get the build (and install)
to work.

Computer:  Dell Inspiron E1505
OS:  Ubuntu 7.04
Lua:  5.1.2
Compiler:  gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
[uname -a:  Linux dell 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC
2007 i686 GNU/Linux]

1.  After unpacking lua 5.1.2, I attempted "make linux" as a non-root
user -- Received errors such as "assert.h, no such file or directory"
indicating missing headers.

Fix:  Used Ubuntu's Synaptic package manager (under System |
Administration menu) to install g++ and reinstall gcc.  One of the two
caused the missing headers to be installed.

2.  Restart "make linux", eventually received error that
readline/readline.h and readline/history.h could not be found (no such
file or directory).  Tried reinstalling readline-common -- didn't
help.  Tried using Synaptic's search feature to search for "readline"
-- didn't help.

Fix:  From the command line, "sudo apt-cache search readline" showed a
line "libreadline5-dev - GNU readline and history libraries,
development files".  Used Synaptic to install libreadline5-dev.
Restarted "make linux" and the build completed successfully.  "make
test" worked.

3.  To install lua, ran "sudo make install".

Mission accomplished -- now ready to learn lua.

Mason Deaver


Well, A title like ``The way to build lua on xxx'' might be better.
and again, building lua in GNU/Linux is easy. For ubuntu/debian just
tar zxf the tarball
sudo apt-get install build-essential
make linux
done.
and in fact, if you just want to install lua, just use the lua
distribution in the sources:
sudo apt-get install lua5.1