BUG 总线错误 ruby​​ 1.8.7 [英] BUG Bus Error ruby 1.8.7

查看:15
本文介绍了BUG 总线错误 ruby​​ 1.8.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在带有 Xcode 4.2 GM(新 MacBook)的 Lion 10.7.1 上使用 RVM 编译 Ruby 1.8.7 后出现错误.

I'm getting an error after compiling Ruby 1.8.7 using RVM on Lion 10.7.1 with Xcode 4.2 GM (new MacBook).

它编译得很好,但是当我尝试安装任何 gem 时,我得到以下信息:

It compiles fine but when I try to install any gem I get the following:

gem install bundler
/Users/me/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/timeout.rb:60: [BUG] Bus Error
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0]

Abort trap: 6

更新:最后我希望安装 Xcode 4.2,安装 Ruby 1.8.7、1.9.x 的 RVM 并且一切正常.

Update: In the end I hope to have Xcode 4.2 installed, RVM with Ruby 1.8.7, 1.9.x installed and all working properly.

推荐答案

由于我必须解析其中的几个答案才能让 XCode 4.2 工作,我想我应该把它们放在一起:

Since I had to parse through several of these answers to get things working with XCode 4.2, I thought I'd put it all together:

  1. 安装 Xcode 4.2
  2. https://github.com/kennethreitz/osx-gcc- 安装 gcc 独立编译器安装程序(替代 Xcode)
  3. export CC=gcc-4.2 添加到您的 ~/.bash_profile 或等效文件中(不要忘记重新加载)
  4. 运行 rvm implode" 然后重新安装 rvm http://beginrescueend.com/
  1. Install Xcode 4.2
  2. Install the gcc standalone compiler from https://github.com/kennethreitz/osx-gcc-installer (which replaces Xcode)
  3. Add export CC=gcc-4.2 to your ~/.bash_profile or equivalent (don't forget to reload it)
  4. Run rvm implode" then re-install rvm http://beginrescueend.com/

此时,我能够 rvm 安装 ruby​​-1.8.7(和 ruby​​-1.9.2),并且实际上可以安装我的 gem.

At this point I was able to rvm install ruby-1.8.7 (and ruby-1.9.2), and actually get my gems to install.

这篇关于BUG 总线错误 ruby​​ 1.8.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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