简体   繁体   English

安装gem atomic时出错

[英]Error installing gem atomic

I tried installing the atomic gem after a bundle error when I ran rails new "app" command. 当我运行rails new "app"命令时,我尝试在发生捆绑错误后安装atomic gem。 I'm running OS X 10.9.2. 我正在运行OS X 10.9.2。 I also tried the xcode-select --install command. 我还尝试了xcode-select --install命令。 Here are my results. 这是我的结果。

> sudo gem install atomic -v '1.1.16'
Building native extensions.  This could take a while...
ERROR:  Error installing atomic:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for libkern/OSAtomic.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling atomic_reference.c
atomic_reference.c:57:59: warning: incompatible pointer types passing 'void **' to parameter of type 'volatile int64_t *' (aka 'volatile long long *') [-Wincompatible-pointer-types]
    if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
                                                          ^~~~~~~~~~~~~~~
/usr/include/libkern/OSAtomic.h:507:93: note: passing argument to parameter '__theValue' here
bool    OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue );
                                                                                            ^
1 warning generated.
linking shared-object atomic_reference.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: *** [atomic_reference.bundle] Error 1

make failed, exit code 2

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

For Installing atomic 1.1.16 , you must have JDK8 installed on your system. 对于安装atomic 1.1.16 ,您必须在系统上安装JDK8 It is a prerequisite. 这是先决条件。

However, it is not required after that. 但是,此后不需要。 Just for installing the gem. 仅用于安装gem。

To run the gem, you just need JDK6 or greater. 要运行gem,您只需要JDK6或更高版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM