【问题标题】:Fast-stemmer installation problems快速词干安装问题
【发布时间】:2014-03-26 20:44:58
【问题描述】:

由于fast-stemmer 的问题,我很难安装任何我想要的 ruby​​ gem。我已经把我得到的错误放在下面。

Building native extensions.  This could take a while...
ERROR:  Error installing fast-stemmer:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling porter.c
porter.c:359:27: warning: '&&' within '||' [-Wlogical-op-parentheses]
  if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
            ~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~
porter.c:359:27: note: place parentheses around the '&&' expression to silence this warning
  if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
                      ^
               (                          )
1 warning generated.
compiling porter_wrap.c
linking shared-object stemmer.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [stemmer.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/fast-stemmer-1.0.2/gem_make.out

我尝试解决的问题包括:更新 ruby​​ gems、更新 rvm、使用 ruby​​ 2.1.1、重新安装命令行工具。我在小牛队。

如果有人可以帮助我,将不胜感激!

【问题讨论】:

标签: ruby gem rvm


【解决方案1】:

因此,我遇到的问题似乎是由更新最后一个 xCode 引起的,该 xCode 又将 clang 更新到 5.1,这反过来又破坏了许多尚未更新的 ruby​​ gem,以反映 clang 的重大变化5.1。我在Cloudspace blog 上找到了这一切。

他们的解决方案(目前 - 错误表明它们将来会成为硬错误)是放置以下标志以让您的编译器忽略该问题:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

例如:

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install librarian-chef

或捆绑:

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future bundle install

【讨论】:

  • 优秀的评论@Helen!请把你自己的答案标记为正确的,因为它是正确的。 :)
  • @PerLundberg 感谢您提醒我!当我第一次找到答案时我尝试过,但我没有足够的代表点来立即执行此操作
猜你喜欢
  • 2021-04-15
  • 1970-01-01
  • 2011-07-15
  • 2011-09-05
  • 1970-01-01
  • 2014-10-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多