在Linux上使用rvm,ruby 1.8.7和gcc 4.7安装bundler [英] install bundler using rvm, ruby 1.8.7 with gcc 4.7 on linux

查看:112
本文介绍了在Linux上使用rvm,ruby 1.8.7和gcc 4.7安装bundler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在linux(Fedora 17,Arch等)上编译ruby 1.8.7或者安装GCC 4.7的bundle gem。这个问题发生在我使用RVM的时候。我能够安装1.8.7,但无法安装捆绑软件宝石。我会收到以下错误:

$ p $ $ gem install bundler

〜/ .rvm / rubies / ruby-1.8.7-p358 / lib / ruby​​ / 1.8 / timeout.rb:60:[BUG]分割错误
ruby​​ 1.8.7(2012-02-08 patchlevel 358)[x86_64-linux]

这个问题在很多地方都有描述,包括:


解决方案

原始问题链接中的问题描述建议安装旧版本的gcc以构建1.8.7,这不是必需的

  $ rvm删除1.8.7 
$ CFLAGS = - O2 -fno-tree-dce -fno-optimize rm安装1.8.7
$ rvm使用1.8.7
$ gem install bundler

解决方案源自以下内容:

Bug#6383:使用GCC 4.7编译时超时模块中的Segfault


Issues building ruby 1.8.7 or installing the bundler gem with GCC 4.7 on linux (Fedora 17, Arch, etc.). This issue occurred for me using RVM. I was able to install 1.8.7, but unable to install the bundler gem. I would receive the following error:

$ gem install bundler

~/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]

this issue is described in a number of locations, including:

解决方案

The description of the problem in the links in the original question suggest installing older versions of gcc to build 1.8.7, this is not necessary.

$ rvm remove 1.8.7
$ CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" rvm install 1.8.7
$ rvm use 1.8.7
$ gem install bundler

Solution derived from the following:

Bug #6383: Segfault in Timeout module when compiled with GCC 4.7

这篇关于在Linux上使用rvm,ruby 1.8.7和gcc 4.7安装bundler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆