Thursday, 28 November 2013

Installing Lua and Luarocks in CentOS

Installing Lua and Luarocks in CentOS:

     There seems to be something wrong with CentOS' lua package (version 5.1.4). After installing lua via yum, compiling luarocks in /usr/local/src/ and running the luarocks command, you will end up with the following error:

The issue seems to persist even in CentOS 6. So we suggest building lua and luarocks directly from the source after some OS library dependencies are met:

     # yum install gcc gcc-c++ kernel-devel    
     # yum install readline-dev                         
     # yum install ncurses-devel.i386               


Proceed to download and compile lua:

     # wget http://www.lua.org/ftp/lua-5.1.4.tar.gz     
     # tar zxvf lua-5.1.4.tar.gz                                     
     # cd lua-5.1.4                                                       
     # make linux                                                        
 

Download and install luarocks:

     # wget http://luarocks.org/releases/luarocks-2.0.6.tar.gz    
     # tar zxvf luarocks-2.0.6.tar.gz                                             
     # cd luarocks-2.0.6                                                               
     # ./configure                                                                          
     # make                                                                                  
     # make install                                                                        


This should help you have luarocks properly installed and ready to fetch lua modules from the repo. Have fun!

No comments:

Post a Comment