[vim/vim] Vim requires +python or +python3 even when installing with python support, installing with yum the syntax.vim location is wrong (#3383)

556 views
Skip to first unread message

PiedPieper

unread,
Aug 27, 2018, 1:12:18 PM8/27/18
to vim/vim, Subscribed

[ec2-user@ip-172-31-16-9 vim]$ whereis vim
vim:
(blank)

Vim is not installed.

Installing from source:

./configure --enable-pythoninterp --prefix=/usr
make && sudo make install
...
make[1]: Leaving directory `/home/ec2-user/repos/vim-config/vim/src'
[ec2-user@ip-172-31-16-9 vim]$ vim anything.txt
Error: Required vim compiled with +python or +python3
Press ENTER or type command to continue

[ec2-user@ip-172-31-16-9 vim]$ whereis vim
vim: /usr/bin/vim /usr/share/vim /usr/share/man/man1/vim.1

Installing with yum:

sudo yum install vim
..
[ec2-user@ip-172-31-16-9 vim]$ vim appveyor.yml
Error detected while processing /etc/vimrc:
line 50:
E484: Can't open file /usr/share/vim/vim74/syntax/syntax.vim
Error detected while processing /home/ec2-user/.vimrc:
line 5:
E484: Can't open file /usr/share/vim/vim74/syntax/syntax.vim


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Tony Mechelynck

unread,
Aug 27, 2018, 4:53:40 PM8/27/18
to vim/vim, Subscribed
  1. If yum doesn't install the runtime files where the executable which it installs expects them, then either the first vim in the $PATH is not the one yum installed but the one you built just before (and there is a mismatch), or you forgot to install the runtime files package (but yum should have added it as a requirement for the vim package), or else there is an error with how your distro's packages are built (which distro is that?) and in this latter case you should report the problem to them. To find out all the "vim" executables on your system, run the bash shell and tell it type -a vim.
  2. /usr/share/vim/vim74/ is the $VIMRUNTIME for Vim 7.4. Since then, Vim 8.0 has come and gone (with 1850 patchlevels) and the latest source as of this writing is Vim 8.1.328, whose $VIMRUNTIME is a path ending in /vim81. By default (if you don't specify an install location, which is the recommended procedure for an own-compiled Vim) the executable will be installed at /usr/local/bin/vim and its $VIMRUNTIME (for version 8.1) will be the tree starting at /usr/local/share/vim/vim81/.
  3. If after configuring with --enable-pythoninterp you get an executable without Python support then it means that the Python2 library package and the Python2 development package are not both installed. Find out with the help of yum how these packages are named on your distro (they should have names with python in them and version numbers starting with 2.), install them, and try again. Or else, if the Python 3 library and development packages are already installed, then reconfigure with --enable-python3interp and recompile.

Best regards,
Tony.

PiedPieper

unread,
Aug 27, 2018, 5:08:54 PM8/27/18
to vim/vim, Subscribed

Hi @tonymec , I just installed python-devel and ran the following

cd ~
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge
--enable-multibyte
--enable-rubyinterp
--enable-pythoninterp
--with-python-config-dir=/usr/lib64/python2.7/config
--enable-gui=gtk2 --enable-cscope --prefix=/usr
make VIMRUNTIMEDIR=/usr/share/vim/vim81

This worked for centos - My guess is that without specifying the python-config-dir vim couldn't find it.

As for why yum wasn't working, you are probably right. This is RHEL 7.5 from AWS if that helps.

Thanks for your help!

PiedPieper

unread,
Aug 27, 2018, 6:50:42 PM8/27/18
to vim/vim, Subscribed

Closed #3383.

Reply all
Reply to author
Forward
0 new messages