1
1

More than 5 years have passed since last update.

CentOS5系にvim7.4(+Lua+Python+Ruby)をインストール

Last updated at Posted at 2013-10-24

ちょっと古い環境で開発することがあったんだけど、vimのプラグインでLuaとPython使いたかったのに標準のvimだと使えなかった。というかvimのバージョンが7.2と低かったのでいろいろ駄目で、いちから入れる。
あと、標準のPythonが2.4で、いろんなプラグインで支障が出るのでこれも入れ替え。
rootでやってます。

Python3インストール

yumであるわけもないので、普通にソースコードから、configure, make, make install. 特になし

Rubyインストール

普通にソースコードから、configure, make, make install. 特n

Luaインストール

これはちょっこりハマった。
http://rcmdnk.github.io/blog/2013/08/07/computer-vim/
これを参考に

$ make linux MYLIBS=-ltermcap
$ make install INSTALL_TOP=/usr/local

vimインストール

vimのソースもってくるのはこれとか参考にした。
http://qiita.com/muniere/items/0569d05d470c5d3dc51b

Python3 を、ねんのため/usr/binから見えるようにしておく

ln -s /usr/local/bin/python3.3 /usr/bin/python3

python-config は、インストールしたバージョンに合わせたり適当に。

./configure CPPFLAGS=-I/usr/local/include/python3.3 LDFLAGS=-L/usr/local/lib/python3.3 --with-features=huge --with-local-dir=/usr/local --enable-perlinterp --disable-pythoninterp --enable-rubyinterp=yes --enable-luainterp=yes --enable-fail-if-missing --enable-multibyte --disable-selinux --prefix=/usr/local  --with-lua-prefix=/usr/local --enable-python3interp --with-python3-config-dir=/usr/local/lib/python3.3/config-3.3m/
make
make install

Python.h が見えない、とか言われたら古いバージョンでもいいからpython-devel をyumで入れて黙らせるか、さっきpython入れたので

$ set C_INCLUDE_PATH=/path/to/python_include_files/

とか先にやっておけばいいと思います未確認です。

あとは、.bashrc か .zshrc あたりに

alias vi=/usr/local/bin/vim

とか。
これで普段使いのvimプラグインが動いたやったー

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1