【问题标题】:Failed to install Jekyll using Gem in Ruby: redcarpet-3.2.0 Makefile:238 error: Multiple target patterns在 Ruby 中使用 Gem 安装 Jekyll 失败:redcarpet-3.2.0 Makefile:238 错误:多个目标模式
【发布时间】:2014-10-31 23:19:44
【问题描述】:

我无法在 Ruby 中使用 gem 安装 Jekyll。这是输出消息:

D:\Ruby21\bin>gem install jekyll
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
        ERROR: Failed to build gem native extension.

    D:/Ruby21/bin/ruby.exe extconf.rb
creating Makefile

make "DESTDIR=" clean
Makefile:238: *** multiple target patterns.  Stop.

make "DESTDIR="
Makefile:238: *** multiple target patterns.  Stop.

make failed, exit code 2

Gem files will remain installed in D:/Ruby21/lib/ruby/gems/2.1.0/gems/redcarpet-3.2.0 for inspection.
Results logged to D:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/redcarpet-3.2.0/gem_make.out

D:\Ruby21\bin>

Unlike the other issue here,错误在第 222 行的 Makefile 中中断,我在第 238 行的 Makefile 中中断。

我可以说它与我的安装路径中的空格无关(因为我在 D 驱动器的根目录中安装了 Ruby)。但是那里的任何事情都超出了我的范围。

我使用的是 Windows Vista x86。我已经安装了 Ruby 2.1.0 stable。

有谁知道如何解决这个问题?

【问题讨论】:

  • 如果您反对,请提供反馈,以便我成为更好的 Stack Overflow 成员。欢迎任何反馈。

标签: ruby makefile gem installation jekyll


【解决方案1】:

没关系,我没有解决问题,而是使用了解决方法。

我在笔记本电脑上安装了 Cygwin-x86,然后安装了 Ruby 和 Rubygem,最后安装了 Jekyll,并设法克服了 redcarpet-v3.2.0 构建错误。

在 Cygwin 中安装 Jekyll:

  1. 运行 cygwin-setup.exe。
  2. 安装适当的软件包:Ruby、rubygem、make、gcc、git、libxslt、libxml2。可能需要更多的软件包here
  3. 使用gem install jekyll 安装jekyll。等等。
  4. 输入命令:vim ~/.bashrc
  5. 滚动到最后并添加export PATH=$PATH:".gem/ruby/gems/jekyll-2.4.0/bin"

这就是 Jekyll 在 Cygwin 上的安装方式。

稍后,您可能需要以下内容:

  • 颠覆
  • bzip2
  • apt-cyg
  • 补丁
  • 卷曲
  • rvm
  • jemoji
  • jekyll 站点地图

并且必须做很多~/.bashrc编辑,调用source $HOME/path/to/rvm和PATH修复。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-07
    • 1970-01-01
    • 2011-05-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-17
    相关资源
    最近更新 更多