首页 技术 正文
技术 2022年11月14日
0 收藏 915 点赞 3,109 浏览 2306 个字

1. ncurses 安装

官网下载:http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz

CSDN 下载:http://download.csdn.net/detail/spch2008/8828779

tar -xf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure
make
sudo make install

2. lua 安装  

官方网下载:http://www.lua.org/download.html

CSDN 下载:http://download.csdn.net/detail/spch2008/8828787

tar -xf lua-5.3.1.tar.gz
cd lua-5.3.1
make linux
sudo make install

 

问题一:

error: readline/readline.h: No such file or directory

下载readline

CSDN下载:http://download.csdn.net/detail/spch2008/8828777

cd readline-5.2
./configure
sudo make
sudo make install

问题二:

//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 `tgetflag'
//usr/local/lib/libreadline.so: undefined reference to `UP'
//usr/local/lib/libreadline.so: undefined reference to `tgetent'
//usr/local/lib/libreadline.so: undefined reference to `tgetnum'
//usr/local/lib/libreadline.so: undefined reference to `PC'
//usr/local/lib/libreadline.so: undefined reference to `tgetstr'
//usr/local/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status

添加 -lncurses 参数

/home/spch2008/lua-5.3.1/src/Makefile

linux:
110 $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"

3. vim 安装

官方下载:ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2

CSDN下载:http://download.csdn.net/detail/spch2008/8828773

tar -xf  vim-7.4.tar.bz2
cd vim74
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp --enable-luainterp --with-lua-prefix=/usr/localsudo makesudo make install

可以将输出重定向到log文件中,查看configure输出:

cat log | grep lua

spch2008@ubuntu:~/vim74$ cat log | grep lua
checking --enable-luainterp argument... yes
checking --with-lua-prefix argument... /usr/local
checking --with-luajit... no
checking for lua... /usr/local/bin/lua
checking if lua.h can be found in /usr/local/include... yes
checking if link with -L/usr/local/lib -llua is sane... yes

问题:

objects/if_lua.o: In function `luaV_list_insert':
/home/spch2008/vim74/src/if_lua.c:777: undefined reference to `luaL_optlong'
collect2: error: ld returned 1 exit status

修改文件 /home/spch2008/vim74/src/if_lua.c

//long pos = luaL_optlong(L, 3, 0);
long pos = (long)luaL_optinteger(L, 3, 0);

4. 安装成功,检测时间,可能遇到问题

打开vim,输入:version, 查看vim编译时间,如果是本次编译生成,则说明正确,然后查看是否有+lua。

若编译时间不正确,则删除旧vim,拷贝新的vim程序

sudo rm -f /usr/bin/vim
sudo rm -f /usr/local/bin
sudo cp ~/vim74/src/vim /usr/bin
sudo cp ~/vim74/src/vim /usr/local/bin
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,082
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,556
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,406
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,179
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,815
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,898