Detailed introduction to LUA environment installation tutorial

Source: Internet
Author: User

LUA environment InstallationThe course is the content to be introduced in this article.LUAOfInstallMethod. For more information, see this article.

My development machine is windows xp sp2

The server is RedHat linux 3.4.4.

1. download the latest package from Lua's official website http://www.lua.org/. I downloaded the lua-5.1.4.tar.gz release package.

Ii. SecureCRT rz command upload lua-5.1.4 to the server. Decompress using the tar-xzvf/lua-5.1.4.tar.gz command to extract a lua-5.1.4 folder.

3. Use the cd/lua-5.1.4 to enter the current working directory to the lua-5.1.4 folder.

4. Run the make command and the prompt is:

 
 
  1. Please do  
  2. make PLATFORM  
  3. where PLATFORM is one of these:  
  4. aix ansi bsd freebsd generic linux macosx mingw posix solaris  
  5. See INSTALL for complete instructions. 

Check whether your system PLATFORM name is in the supported list. If yes, run the make PLATFORM command. Otherwise, run the make generic command according to the INSTALL instructions of lua.

Generally, compilation is successful. If a compilation error occurs, check RPWT first.

Finally, run the make install command.

Now, the lua language environment has been successfully installed. Enter the lua command under SecureCRT to enter the lua command line!

 
 
  1. print('Hi,this is  my first lua program!') 

Of course, it can also become a little more Lua:

 
 
  1. io.write('Hi,this is  my first lua program!'') 

Attached operation command:

 
 
  1. [root@localhost ~]# rz   
  2. [root@localhost ~]# tar -xzvf lua-5.1.4.tar.gz  
  3. [root@localhost ~]# cd lua-5.1.4  
  4. [root@localhost lua-5.1.4]# make   
  5.  [root@localhost lua-5.1.4]# ls  
  6. [root@localhost lua-5.1.4]# cat /proc/version  
  7. [root@localhost lua-5.1.4]# make PLATFORM  
  8. [root@localhost lua-5.1.4]# make generic  
  9. [root@localhost lua-5.1.4]# make install  
  10.  
  11. [root@localhost lua-5.1.4]# lua  
  12.  
  13. Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio  
  14. > print('hi,this is my frist lua program')  
  15. hi,this is my frist lua program  

Lua environment Configuration

To study the wow plug-in, learn Lua.

1. http://luaforge.net/frs/download.php/1037/LuaEdit_2_5.zip download a Lua editor and install

2. Run LuaEdit to create a project. Check View-Debug Windows-Lua OutPut to View the program OutPut.

3. Test it with a simple Hello World.

 
 
  1. -- Hello World in Lua   
  2. print("Hello World.") 

Then F5, if the correct result can be output, then OK.

Summary: DetailsLUA environment InstallationThe content of the Process learning tutorial is complete. I hope this article will help you!

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.