Compilation and Installation notes for Lua scripts in Ubuntu

Source: Internet
Author: User
First, the installation of Lua prefers to download the source code compilation directly from the official website rather than from the Ubuntu source. One is that the official version is not the latest, the other is that the lua installed on the source does not know how to plug the various folders into several scattered places, which is very troublesome to find. On www.lua.org you can download the source code: http://www.lua.or

First, install Lua.

I personally prefer to download the source code compilation directly from the official website instead of the Ubuntu source. One is that the official version is not the latest, the other is that the lua installed on the source does not know how to plug the various folders into several scattered places, which is very troublesome to find.

You can download the source code at www.lua.org: http://www.lua.org/ftp /. Theoretically, after decompression, go to the src/folder and run make linux install. But in fact, you will find that you have another package, and use this command to install: sudo apt-get install libreadline5.

You can also directly download the compiled Binary Package from lua and copy it to the corresponding directory according to the instructions on the website.

Version Problems

The Lua version is easy to worry about. Compared with version 5.1, Lua 5.0 exaggerated the change of several important function names, while online tutorials and examples basically follow 5.0, you will receive a one-click error during compilation. You can refer to "Incompatibilities with the Previous Version" in the last part of the lua source code package doc/manual.html.

What is abnormal is that it is difficult to find other information about version 5.1 Except manual. The only official version of programming in lua, which is based on version 5.1, but they can only be ordered in Amazon bookstore. Although the first version is free of charge, it is indeed based on 5.0. People suspect that they are planning to use this method to sell books and earn money.

C Compilation

When compiling the C/C ++ program that interacts with Lua, do not forget to link the corresponding Library: add the parameter-llua-ldl in the gcc command.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.