【问题标题】:Could not create Makefile for some reason - Trying to install Ruby Gem由于某种原因无法创建 Makefile - 尝试安装 Ruby Gem
【发布时间】:2016-01-06 02:24:34
【问题描述】:

我在为我的 Mac 安装名为 Lingust 的 Ruby Gem 时遇到了一些问题。我收到下面的错误消息,不知道如何解决这个问题。任何帮助将不胜感激。

gem install github-linguist
Building native extensions.  This could take a while...
ERROR:  Error installing github-linguist:
ERROR: Failed to build gem native extension.

/Users/kanery/.rvm/rubies/ruby-2.0.0-p643/bin/ruby -r./siteconf20151008-9054-b4exbs.rb extconf.rb
checking for gmake... no
checking for make... yes
checking for cmake... no
ERROR: CMake is required to build Rugged.
*** 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.

Provided configuration options:
  --with-opt-dir
  --without-opt-dir
  --with-opt-include
  --without-opt-include=${opt-dir}/include
  --with-opt-lib
  --without-opt-lib=${opt-dir}/lib
  --with-make-prog
  --without-make-prog
  --srcdir=.
  --curdir
  --ruby=/Users/kanery/.rvm/rubies/ruby-2.0.0-p643/bin/ruby
  --use-system-libraries

extconf failed, exit code 1

Gem files will remain installed in /Users/kanery/.rvm/gems/ruby-2.0.0-p643/gems/rugged-0.24.0b0 for inspection.

【问题讨论】:

    标签: ruby macos terminal gem github-linguist


    【解决方案1】:

    阅读installation instructions of Rugged,可以看到CMake和pkg-config都是必需的。查看您的错误消息,您的系统上似乎没有安装 CMake。

    如果你使用Homebrew,可以通过运行安装

    brew install cmake
    

    或者您可以从these instructions 之后的源安装它。

    【讨论】:

      猜你喜欢
      • 2013-02-04
      • 1970-01-01
      • 1970-01-01
      • 2013-02-03
      • 2021-02-08
      • 1970-01-01
      • 1970-01-01
      • 2018-06-15
      • 1970-01-01
      相关资源
      最近更新 更多