ruby安装失败,使用rbenv和ruby-build

时间:2014-05-18 10:22:18

标签: ruby rbenv

我想在VirtualBox上的Mint 16 Cinnamon中安装ruby 2.1.2

我已使用rbenv插件安装ruby-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?

1 个答案:

答案 0 :(得分:0)

我忘记了安装相关的库。

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

这个命令解决了我的问题。