Skip to content

Instantly share code, notes, and snippets.

@mikeraynham
Created October 13, 2016 11:40
Show Gist options
  • Save mikeraynham/d63c84c125f04db1211aae0b9fa74cf1 to your computer and use it in GitHub Desktop.
Save mikeraynham/d63c84c125f04db1211aae0b9fa74cf1 to your computer and use it in GitHub Desktop.
Install latest Vim with Python 2.7 on CentOS 6.6

Note: this requires Python 2.7 (python27-devel) to be installed from your favourite repo (e.g., IUS).

Remove existing vim package, if any:

yum remove -y vim-enhanced

Get latest Vim repo:

git clone https://github.com/vim/vim.git /tmp/vim

Install:

cd /tmp/vim/src/

LDFLAGS="-L/usr/local/lib/python2.7/config $(python2.7-config --ldflags)" \
vi_cv_path_python=/usr/local/bin/python2.7 \
vi_cv_var_python_pfx=$(python2.7 -c "import sys; print(sys.prefix)") \
vi_cv_var_python_version=$(python2.7 -c "import sys; print(sys.version[:3])") \
vi_cv_path_python_conf=/usr/local/lib/python2.7/config \
./configure \
  --prefix=/usr \
  --enable-fail-if-missing \
  --with-features=huge \
  --enable-pythoninterp \
  CFLAGS="$(/usr/local/bin/python2.7-config --includes)"

make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment