Can';t使用Ruby和Python支持构建Vim
这是我遇到的一个奇怪的问题,但我已经和它搏斗了一个多小时,没有解决办法。我试图配置一个vim构建,但在使用EnablePython和EnableRuby参数时一直遇到错误 以下是我试图对相关错误部分所做的操作:Can';t使用Ruby和Python支持构建Vim,vim,configure,Vim,Configure,这是我遇到的一个奇怪的问题,但我已经和它搏斗了一个多小时,没有解决办法。我试图配置一个vim构建,但在使用EnablePython和EnableRuby参数时一直遇到错误 以下是我试图对相关错误部分所做的操作: $ ./configure --prefix=/usr/local --with-features=huge --enable-pythoninterp --enable-rubyinterp ... checking --enable-rubyinterp argument... ye
$ ./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假设您想要使用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之类的环境管理器,那么您必须在configure行上指定一个参数,以便configure脚本可以找到更新的Ruby头。关于这一点的文档可以在网站上找到。我刚刚获得了使用Python支持(Arch Linux)编译的Vim,除了nathan的答案之外,我还必须添加:
--with-python-config-dir=/path/to/python/conf
添加到选项列表。出于某种原因,我不必这样做来获得Python 3的支持
我必须做的另一件事是更改python符号链接,使其指向python2.7可执行文件,而不是python3,因为它显然试图使用“python--version”检查版本号,它正在命中python3可执行文件,并且不喜欢它返回的内容。如果Mint只使用Ruby1.8,您可能不会将python3作为python安装,所以您可能不会遇到这个问题,但我认为这是值得一提的 您的发行版是否有python dev或类似的命名包?尝试安装它。您使用哪个Linux发行版?在基于Debian的系统上,
sudo-apt-get-build-dep-vim-gnome应该为您安装所有必要的依赖项。我已经尝试了“sudo-apt-get-build-dep-vim”和“vim-gnome”,在后一种情况下,它会选择“vim”作为源代码包而不是“vim-gnome”,然后会选择“E:找不到vim的源代码包”,似乎您的/etc/apt/sources中缺少了一些deb src
行?请记住sudo apt get install vim
工作正常