【问题标题】:An error occured while installing ffi (1.1.2), and Bundler cannot continue安装 ffi (1.1.2) 时出错,Bundler 无法继续
【发布时间】:2012-07-30 16:26:25
【问题描述】:

在 Rails 3.0 项目中运行 OSX Mountain Lion。

在 Rails 项目中尝试使用 bundler 更新我的 gem 时,出现以下错误:

An error occured while installing ffi (1.1.2), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.1.2'` succeeds before bundling.

ERROR:  Error installing ffi:
    ERROR: Failed to build gem native extension.

        /Users/victorstan/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

...

You have to install development tools first.

我已经安装了 XCode 以及命令行工具。

【问题讨论】:

    标签: ruby-on-rails gem ffi osx-mountain-lion


    【解决方案1】:

    你应该使用:

    sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
    

    另请参阅Issue with installing ImageMagick and rmagick on Mountain Lionhttps://gist.github.com/1860511

    【讨论】:

    【解决方案2】:

    如果您为 Xcode 重新安装命令行工具,它应该可以正常工作。这是这样做的链接: https://developer.apple.com/downloads/index.action?=Command%20Line%20Tools%20%28OS%20X%20Mountain%20Lion%29

    【讨论】:

      猜你喜欢
      • 2016-03-14
      • 2022-01-20
      • 2017-02-09
      • 2018-09-08
      • 2020-01-16
      • 2021-06-25
      • 2014-01-12
      • 2018-04-05
      • 2020-05-07
      相关资源
      最近更新 更多