2013-01-10 15 views
4

這是一個奇怪的問題 - 但我一直在摔跤超過一個小時沒有解決方案。我正在嘗試配置一個vim構建版本,但是使用啓用python並啓用ruby參數時仍然遇到錯誤。無法用Ruby和Python支持構建Vim

這裏是我想要做的相關的錯誤部分:

$ ./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,但嘗試了一些不同的事情 - 一切都是徒勞。幫幫我!

編輯:我跑薄荷14

+0

你的發行版是否有一個python-dev或類似的命名包?嘗試安裝它。 –

+0

你使用哪種Linux發行版?在基於Debian的系統上,'sudo apt-get build-dep vim-gnome'應該安裝所有必要的依賴關係。 –

+0

我試過了'sudo apt-get build-dep vim'和'vim-gnome',後者是'Picking \'vim''作爲源包而不是'vim-gnome \',然後去'E:無法找到vim的源代碼包' – Xiv

回答

5

假設你想使用Ruby(1.8.7)和Python的版本(??)與Linux Mint的那艘,您將需要各自發展包。

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

我剛剛得到的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,所以您可能沒有這個問題,但我認爲這是值得一提的。