在Solaris 10编译并安装Vim 7.3

在Solaris 10编译并安装Vim 7.3这里讲两种方式:
使用预编译包
自己编译
两种的差别:预编译包没有提供multi-byte支持。自己编译就尽在掌握。

一、如果你用的是预编译包,那就这样
1. 到下载一个针对你的处理器的预编译的vim73包,我的是SPARC:
2. 解压并安装:
pkgadd -d vim-7.3-sol10-sparc-local
过程中提示是否创建/usr/local目录,这是必须的,选择y即可
3. 把/usr/local/bin添加到/etc/profiel中,如下:
export PATH=/usr/local/bin:/usr/sbin:/usr/bin:/usr/X/bin:/usr/X11/bin
4. 这时执行vim还会报错,需要如下的包:
4.1
4.2
4.3
4.4
5. OK!
6. 关于vim的配置,可以参加另一篇文章:

二、如果你要自己编译,那就这样:
1. 确保你的solaris上有gcc、make程序。
2. 下载并解压
3. 我的编译选项是:
./configure --prefix=/usr/local/vim73 --enable-multibyte --with-features=big --disable-selinux
(同
4. 报错:
......
checking for sysinfo.mem_unit... no
checking for sysconf... yes
checking size of int... 0
checking size of long... 0
checking size of time_t... 0
checking size of off_t... configure: error: in `/export/home/brant/vimsrc/vim73/src':
configure: error: cannot compute sizeof (off_t)
See `config.log' for more details.
找了一会,是因为LIBS没有包括libiconv.*的目录(原文链接:?rnum=141&_done=/group/vim_dev/browse_frm/month/2011-02?&pli=1)。
因为我的Solaris默认没有libiconv库文件,所以我自己装的,但是默认是装在/usr/local/lib,没有在/lib/目录。所以手动copy过去就可以了。
5. make && make install
6. 运行vim还会报错:
ld.so.1: vim: fatal: libintl.so.8: open failed: No such file or directory
Killed
这是因为我的Solaris默认没有libintl库文件,所以我自己装的,但是默认是装在/usr/local/lib,没有在/lib/目录。所以手动copy过去就可以了。
7. OK!
8. 关于vim的配置,可以参加另一篇文章

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/21969.html