繁体   English   中英

使用rbenv和ruby-build进行ruby安装失败

[英]ruby install fails with rbenv and ruby-build

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

我已经用ruby-build插件安装了rbenv并运行了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?

我忘记了安装相关的库。

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM