簡體   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