歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 在Solaris 10編譯並安裝Vim 7.3

在Solaris 10編譯並安裝Vim 7.3

日期:2017/2/28 15:50:40   编辑:Linux教程

在Solaris 10編譯並安裝Vim 7.3這裡講兩種方式:
使用預編譯包
自己編譯
兩種的差別:預編譯包沒有提供multi-byte支持。自己編譯就盡在掌握。

一、如果你用的是預編譯包,那就這樣
1. 到http://www.sunfreeware.com/indexsparc10.html下載一個針對你的處理器的預編譯的vim73包,我的是SPARC: http://www.sunfreeware.com/sparc/10/vim-7.3-sol10-sparc-local.gz
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 http://www.sunfreeware.com/sparc/10/ncurses-5.7-sol10-sparc-local.gz
4.2 http://www.sunfreeware.com/sparc/10/libintl-3.4.0-sol10-sparc-local.gz
4.3 http://www.sunfreeware.com/sparc/10/libgcc-3.4.6-sol10-sparc-local.gz
4.4 http://www.sunfreeware.com/sparc/10/libiconv-1.14-sol10-sparc-local.gz
5. OK!
6. 關於vim的配置,可以參加另一篇文章:http://www.linuxidc.com/Linux/2012-05/61193.htm

二、如果你要自己編譯,那就這樣:
1. 確保你的solaris上有gcc、make程序。
2. 下載http://www.sunfreeware.com/SOURCES/vim-7.3.tar.gz並解壓
3. 我的編譯選項是:
./configure --prefix=/usr/local/vim73 --enable-multibyte --with-features=big --disable-selinux
(同http://www.linuxidc.com/Linux/2012-05/61193.htm)
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.*的目錄(原文鏈接:http://groups.google.com/group/vim_dev/tree/browse_frm/month/2011-02/8abf05462f0305c1?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的配置,可以參加另一篇文章 http://www.linuxidc.com/Linux/2012-05/61193.htm

Copyright © Linux教程網 All Rights Reserved