Lua環境搭建

來源:互聯網
上載者:User

工作環境:ubuntu9.10,lua-5.1.4.tar.gz.

1、下載lua的源碼包,地址如下,最新版本5.1.4。

 

2、下載ubuntu的編譯支援

sudo apt-get install build-essential

注意,這裡不僅僅是安裝gcc而已,還包括很多其他工具。

 

3、下載libreadline相關支援,這個東西在編譯時間需要用到,無奈。

sudo apt-get install libreadline5

sudo apt-get install libreadline5-dev

 

4、編譯以及安裝

tar xzvf lua-5.1.4.tar.gz

cd lua-5.1.4

make linux

sudo make install

這裡make的參數linux也可以是其他動作系統,視具體情況而定。

 

5、測試

$ lua

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

>

按下Ctrl+D退出。

Windows下安裝。

http://code.google.com/p/luaforwindows/downloads/list 下載windows下的lua,安裝後有相應的例子供學習

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.