Ruby 安装crypt时出错(3.1.7)
运行sudo bundle安装时出现错误消息:Ruby 安装crypt时出错(3.1.7),ruby,rubygems,bundle,bundler,bcrypt,Ruby,Rubygems,Bundle,Bundler,Bcrypt,运行sudo bundle安装时出现错误消息: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb checking for ruby/util.h... yes creating Makefile make "DESTDIR=&quo
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.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: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
然后我尝试运行sudo gem install bcrypt-v“3.1.7”,并显示以下错误消息:
Building native extensions. This could take a while...
ERROR: Error installing bcrypt:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.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: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
在此之后,我尝试运行sudogem安装bcrypt,但仍然无法运行。有什么提示吗?我从Mac应用商店升级了Xcode,这导致了我的这个特殊错误
在我的情况下修复它的方法是:运行Xcode并接受许可条款,等等。然后当我运行
bundle install
时,它编译并安装了bcrypt
很好。sudo ARCHFLAGS的可能重复=-Wno error=未使用的命令行参数将来gem安装中的硬错误bcrypt似乎正在工作!如果它有效,并且解决了您的问题,您应该为将来路过的其他人发布您自己问题的答案。谢谢@Chris,刚刚这么做,一切都正常。