2014-05-18 160 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 

该命令解决了我的问题。