Skip to content

Instantly share code, notes, and snippets.

@lemonjp
Last active June 25, 2016 08:06
Show Gist options
  • Save lemonjp/685dbdd94dc73c18cfcb5a6ff52a060c to your computer and use it in GitHub Desktop.
Save lemonjp/685dbdd94dc73c18cfcb5a6ff52a060c to your computer and use it in GitHub Desktop.
Vim7.4 for Centos6

Vim 7.4 Install for CentOS

check whether vim support on python or not.

:py import sys; print(sys.version_info)

os level support python check

$ python --version Python 2.6.6

$ uname -a

Linux localhost.localdomain 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

install python27

yum install python-devel

to enable for python and lua.

CentOS6.5 にpython環境(vimとか)を作ったときのメモ

PyenvをCentOS6.3でセットアップする(超かんたんリファレンス付き)

PyEnv環境インストール for CentOS

yum install gcc gcc-c++ make git openssl-devel bzip2-devel zlib-devel readline-devel sqlite-devel bzip2 sqlite

git clone git://github.com/yyuu/pyenv.git ~/.pyenv

<以下を.bashrcに追加>

export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then
    export PATH=${PYENV_ROOT}/bin:$PATH
    eval "$(pyenv init -)"
fi

インストール可能なバージョンが表示されるか確認

pyenv install --list

pyenv install 2.7.11
pyenv install 3.5.1

for YouCompleteMe Vim Plugin

export PYTHON_CONFIGURE_OPTS="--enable-shared"
pyenv install 3.5.1

インストールしたバージョン、およびシステムデフォルトのものが表示されます。

pyenv versions

Pyenv-virtualenvを使うとバージョンも環境も簡単にスイッチできるので入れておく。

cd ~/.pyenv/plugins
git clone git://github.com/yyuu/pyenv-virtualenv.git

pyenv virtualenv 2.7.11 virtualenv2-7-11
pyenv virtualenv 3.5.1 virtualenv3-5-1

for YouCompleteMe Vim Plugin

pyenv virtualenv 3.5.1 YCMvirtualenv

仮想環境をカレントディレクトリに適用

pyenv local testvirtualenv

yum install lua lua-devel

luajit install

cd /usr/local/src/
git clone http://luajit.org/git/luajit-2.0.git luajit
cd luajit

vim 7.4 configure

cd /usr/local/src/vim

$ LDFLAGS="-Wl,-rpath=${HOME}/.pyenv/versions/2.7.11/lib:${HOME}/.pyenv/versions/3.5.1/lib" ./configure \
    --enable-fail-if-missing \
    --enable-luainterp \
    --enable-pythoninterp=dynamic \
    --enable-rubyinterp=yes \
    --enable-multibyte \
    --enable-fontset \
    --enable-gui=gnome2 \
    --disable-selinux \
    --with-features=huge \
    --with-luajit

make && make install

vi then if error

libluajit-5.1.so.2: cannot open shared object file: No such file or directory

echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib >>  ~/.bash_profile
echo export LD_LIBRARY_PATH >>  ~/.bash_profile
source ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment