Xiv
Xiv

Reputation: 10073

Can't build Vim with Ruby and Python support

This is a strange problem I'm having - but I've been wrestling with it for over an hour with no solution. I'm trying to configure a vim build, but keep running into errors with the enable python and enable ruby arguments.

Here is what I'm trying to do with the relevant error parts:

$ ./configure --prefix=/usr/local --with-features=huge --enable-pythoninterp --enable-rubyinterp
...
checking --enable-rubyinterp argument... yes
checking --with-ruby-command argument... defaulting to ruby
checking for ruby... (cached) /usr/bin/ruby
checking Ruby version... OK
checking Ruby rbconfig... RbConfig
checking Ruby header files... not found; disabling Ruby
...
checking --enable-pythoninterp argument... yes
checking for python2... (cached) /usr/bin/python2
checking Python version... (cached) 2.7
checking Python is 1.4 or better... yep
checking Python's install prefix... (cached) /usr
checking Python's execution prefix... (cached) /usr
(cached) checking Python's configuration directory... (cached) 
can't find it!
...

I'm completely stumped, I'm relatively new to linux but tried a few different things - all to no avail. Help!

EDIT: I'm running Mint 14

Upvotes: 5

Views: 4814

Answers (2)

Jeremy
Jeremy

Reputation: 380

I just got Vim to compile with Python support (Arch Linux), and in addition to nathan's answer, I had to add:

--with-python-config-dir=/path/to/python/conf

to the list of options. For some reason, I didn't have to do this to get python3 support.

One other thing I had to do was change the python symlink so that it pointed to the python2.7 executable instead of python3, because evidently it was trying to check the version number using 'python --version' and it was hitting the python3 executable and not liking what it returned. If Mint is only using Ruby 1.8, you probably won't have python3 installed as python, so you may not have this issue, but I thought it was worth mentioning.

Upvotes: 1

nathan
nathan

Reputation: 5733

Assuming you want to use the versions of Ruby (1.8.7) and Python (??) that ship with Linux Mint, you will need their respective development packages.

sudo apt-get install ruby-dev python-dev

Once that is complete you should be able to run your original configure script

./configure --prefix=/usr/local --with-features=huge --enable-pythoninterp --enable-rubyinterp

As for Ruby, if you are using an environment manager such as RVM or Rbenv then you will have to specify, as a parameter on the confiugre line, so the configure script can find the updated Ruby headers. Documentation for this can be found one the RVM site.

Upvotes: 5

Related Questions