码迷,mamicode.com
首页 > 其他好文 > 详细

ubuntu lua安装

时间:2014-06-17 13:11:16      阅读:536      评论:0      收藏:0      [点我收藏+]

标签:class   blog   http   tar   com   get   

#解压
tar -xzvf  lua5.2.2.tar.gz

#进入lua5.2.2文件夹
cd lua5.2.2

#执行make
sudo make linux

#提示如下错误:
#lua.c:67:31: 致命错误: readline/readline.h:没有那个文件或目录编译中断。

#到网上下载,大小2.2M
sudo 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.gz
cd ncurses-5.7
./configure
make
make 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-dev
sudo apt-get install libreadline6-dbg

#最后执行make linux,make install
sudo make linux
sudo 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

ubuntu lua安装,布布扣,bubuko.com

ubuntu lua安装

标签:class   blog   http   tar   com   get   

原文地址:http://www.cnblogs.com/baiyideng/p/3791662.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!