gpt4 book ai didi

ruby - sudo gem install jekyll -- 失败 -- clang 错误未知参数

转载 作者:数据小太阳 更新时间:2023-10-29 08:27:19 25 4
gpt4 key购买 nike

Jekyll 不会通过下面的 gem install 安装是错误。更远的下方是事物和位置的一些版本。

sudo gem install jekyll                                                                                                                                    
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
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

命令终端直接输出:

[~]$ which ruby
/usr/bin/ruby

[~]$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

[~]$ which gem
/usr/bin/gem
[~]$ gem --version
2.2.2

[~]$ which clang
/usr/bin/clang

[~]$ clang --version
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

OSX 10.9.2,Xcode 5.1 版

最佳答案

Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress' 中遇到同样的问题

我发现本期中对 jekyll 存储库的评论很有帮助: https://github.com/jekyll/jekyll/issues/2125

如果您使用的是 rvm 或 rbenv,您可以检查 Ruby 2.1.1,它应该可以顺利安装。

否则你可以安装ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install jekyll

希望这对您有所帮助!

关于ruby - sudo gem install jekyll -- 失败 -- clang 错误未知参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22777004/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com