首页 > 代码库 > ubuntu lua安装

ubuntu lua安装

#解压tar -xzvf  lua5.2.2.tar.gz#进入lua5.2.2文件夹cd lua5.2.2#执行makesudo make linux#提示如下错误:#lua.c:67:31: 致命错误: readline/readline.h:没有那个文件或目录编译中断。#到网上下载,大小2.2Msudo wget  http://www.sfr-fresh.com/unix/misc/readline-6.1.tar.gz#执行下列操作tar -zxvf readline-6.1.tar.gz,cd ~~ ./configure && make && make install sudo ldconfig#下载ncurses安装wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz#执行下列操作tar -xvf ncurses-5.7.tar.gzcd ncurses-5.7./configuremakemake install#运行make linux,提示/usr/local/lib/libreadline.so: undefined reference to `PC‘/usr/local/lib/libreadline.so: undefined reference to `tgetflag‘/usr/local/lib/libreadline.so: undefined reference to `tgetent‘/usr/local/lib/libreadline.so: undefined reference to `UP‘/usr/local/lib/libreadline.so: undefined reference to `tputs‘/usr/local/lib/libreadline.so: undefined reference to `tgoto‘/usr/local/lib/libreadline.so: undefined reference to `tgetnum‘/usr/local/lib/libreadline.so: undefined reference to `BC‘/usr/local/lib/libreadline.so: undefined reference to `tgetstr‘#google了一下,解决方案都没好用,后来请教同学,告诉我直接从命令行安装下列包,果真好用了不报错了sudo apt-get install libreadline6-devsudo apt-get install libreadline6-dbg#最后执行make linux,make installsudo make linuxsudo make install

  以上内容转载自http://www.w3hacker.com/?p=500

#####################################################################

安装完成后输入lua报错:lua: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: PC"

解决办法:

  cd /usr/local/lib

    mkdir temp
    mv libreadline* temp/
    ldconfig