无法使用Ruby和Python支持构建Vim

时间:2013-01-10 12:32:42

标签: vim configure

这是一个我遇到的一个奇怪的问题 - 但是我一直在与它搏斗超过一个小时没有解决方案。我正在尝试配置vim构建,但是使用enable python继续运行错误并启用ruby参数。

以下是我正在尝试处理的相关错误部分:

$ ./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!
...

我完全难倒,我对linux比较陌生,但尝试了一些不同的东西 - 一切都无济于事。救命啊!

编辑:我正在运行Mint 14

2 个答案:

答案 0 :(得分:5)

假设您要使用Linux Mint附带的Ruby(1.8.7)和Python(??)版本,您将需要各自的开发包。

sudo apt-get install ruby-dev python-dev

一旦完成,您应该能够运行原始配置脚本

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

对于Ruby,如果您使用的是RVM或Rbenv等环境管理器,那么您必须指定,作为confiugre行上的参数,以便configure脚本可以找到更新的Ruby头。可以在RVM站点找到相关文档。

答案 1 :(得分:1)

我只是让Vim用Python支持编译(Arch Linux),除了nathan的回答,我还要添加:

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

到选项列表。出于某种原因,我没有必要这样做以获得python3支持。

我要做的另一件事是更改python符号链接,以便它指向python2.7可执行文件而不是python3,因为显然它试图使用'python --version'检查版本号并且它正在命中python3可执行文件并不喜欢它返回的内容。如果Mint只使用Ruby 1.8,你可能不会将python3安装为python,所以你可能没有这个问题,但我认为值得一提。

相关问题