2014-05-18 221 views
0

我想安裝ruby 2.1.2在Mint 16 Cinnamon on VirtualBox。紅寶石安裝失敗,rbenv和紅寶石構建

我已經安裝rbenvruby-build插件並運行rbenv install 2.1.2,然後失敗,出現此錯誤。

checking for gcc... gcc 
checking whether the C compiler works... no 
configure: error: in `/tmp/ruby-build.20140518190910.5012/ruby-2.1.2': 

gcc --version輸出:

gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 
Copyright (C) 2013 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

我得到了同樣的錯誤與rbenv install 2.1.12.0.0-p481

我該怎麼做才能用rbenv安裝ruby?

回答

0

我忘記了安裝相關的庫。

$ sudo aptitude install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev 

該命令解決了我的問題。