5

这是尝试安装 Ruby 2.0 时出现的错误

Error running 'make -j2',
please read /usr/local/rvm/log/ruby-2.0.0-p247/1372532765_make.log
There has been an error while running make. Halting the installation.

我尝试按照以下步骤操作,但没有成功:Can't install Ruby 2.0.0-p0 with RVM。运行“make -j8”时出错

对此的任何帮助将不胜感激。我不知道该怎么办...

这是日志:

[2013-06-29 15:06:05] make
    CC = clang
    LD = ld
    LDSHARED = clang -dynamiclib
    CFLAGS = -O3 -I/opt/sm/pkg/active/include -fno-common -pipe 
    XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I.
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -install_name /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/libruby.2.0.0.dylib -current_version 2.0.0 -compatibility_version 2.0.0  -fstack-protector -Wl,-u,_objc_msgSend  -fstack-protector -Wl,-u,_objc_msgSend  
    SOLIBS = 
linking miniruby
generating encdb.h
rbconfig.rb updated
generating enc.mk
encdb.h unchanged
generating prelude.c
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
compiling prelude.c
linking static-library libruby.2.0.0-static.a
verifying static-library libruby.2.0.0-static.a
transdb.h unchanged
linking shared-library libruby.2.0.0.dylib
making enc
making trans
make[1]: Nothing to be done for `enc'.
generating makefile exts.mk
make[1]: Nothing to be done for `./enc/trans'.
making encs
configuring -test-/array/resize
configuring -test-/bug-3571
configuring -test-/bug-3662
configuring -test-/bug-5832
configuring -test-/debug
configuring -test-/exception
configuring -test-/fatal
configuring -test-/funcall
configuring -test-/iter
configuring -test-/load/dot.dot
configuring -test-/marshal/compat
configuring -test-/marshal/usr
configuring -test-/method
configuring -test-/num2int
configuring -test-/old_thread_select
configuring -test-/path_to_class
configuring -test-/printf
configuring -test-/st/numhash
configuring -test-/st/update
configuring -test-/string
configuring -test-/symbol
configuring -test-/typeddata
configuring -test-/wait_for_single_fd
configuring -test-/win32/dln
Failed to configure -test-/win32/dln. It will not be installed.
configuring -test-/win32/fd_setsize
Failed to configure -test-/win32/fd_setsize. It will not be installed.
configuring bigdecimal
configuring continuation
configuring coverage
configuring curses
header: ncurses.h
library: ncursesw
configuring date
configuring dbm
header: ndbm.h
library: libc
configuring digest
configuring digest/bubblebabble
configuring digest/md5
configuring digest/rmd160
configuring digest/sha1
configuring digest/sha2
configuring dl
configuring dl/callback
configuring dl/win32
Failed to configure dl/win32. It will not be installed.
configuring etc
configuring fcntl
configuring fiber
configuring fiddle
configuring fiddle/win32
Failed to configure fiddle/win32. It will not be installed.
configuring gdbm
Failed to configure gdbm. It will not be installed.
configuring io/console
configuring io/nonblock
configuring io/wait
configuring json
configuring json/generator
configuring json/parser
configuring mathn/complex
configuring mathn/rational
configuring nkf
configuring objspace
configuring openssl
configuring pathname
configuring psych
configuring pty
configuring racc/cparse
configuring readline
configuring ripper
configuring sdbm
configuring socket
configuring stringio
configuring strscan
configuring syslog
configuring tk/tkutil
Failed to configure tk/tkutil. It will not be installed.
configuring win32ole
Failed to configure win32ole. It will not be installed.
configuring zlib
linking shared-object -test-/array/resize.bundle
linking shared-object -test-/bug-3571/bug.bundle
installing default bug libraries
installing default resize libraries
linking shared-object -test-/bug-5832/bug.bundle
linking shared-object -test-/bug-3662/bug.bundle
installing default bug libraries
installing default bug libraries
linking shared-object -test-/debug.bundle
linking shared-object -test-/exception.bundle
installing default exception libraries
installing default debug libraries
linking shared-object -test-/fatal/rb_fatal.bundle
linking shared-object -test-/funcall/funcall.bundle
installing default funcall libraries
installing default rb_fatal libraries
linking shared-object -test-/iter/break.bundle
linking shared-object -test-/load/dot.dot/dot.dot.bundle
installing default break libraries
installing default dot.dot libraries
linking shared-object -test-/marshal/usr.bundle
linking shared-object -test-/marshal/compat.bundle
installing default compat libraries
installing default usr libraries
linking shared-object -test-/num2int/num2int.bundle
linking shared-object -test-/method.bundle
installing default method libraries
installing default num2int libraries
linking shared-object -test-/path_to_class/path_to_class.bundle
linking shared-object -test-/old_thread_select/old_thread_select.bundle
installing default path_to_class libraries
installing default old_thread_select libraries
linking shared-object -test-/printf.bundle
linking shared-object -test-/st/numhash.bundle
installing default printf libraries
installing default numhash libraries
linking shared-object -test-/st/update.bundle
linking shared-object -test-/string/string.bundle
installing default update libraries
linking shared-object -test-/symbol/symbol.bundle
installing default string libraries
linking shared-object -test-/typeddata/typeddata.bundle
installing default symbol libraries
installing default typeddata libraries
linking shared-object -test-/wait_for_single_fd/wait_for_single_fd.bundle
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
linking shared-object bigdecimal.bundle
installing default wait_for_single_fd libraries
linking shared-object continuation.bundle
installing default bigdecimal libraries
linking shared-object coverage.bundle
installing default continuation libraries
linking shared-object curses.bundle
installing default coverage libraries
installing default curses libraries
linking shared-object date_core.bundle
linking shared-object dbm.bundle
installing default dbm libraries
installing default date_core libraries
linking shared-object digest.bundle
linking shared-object digest/bubblebabble.bundle
installing digest libraries
installing default digest libraries
installing default bubblebabble libraries
linking shared-object digest/md5.bundle
linking shared-object digest/rmd160.bundle
installing default rmd160 libraries
installing default md5 libraries
linking shared-object digest/sha1.bundle
linking shared-object digest/sha2.bundle
installing default sha1 libraries
installing default sha2 libraries
linking shared-object dl/callback.bundle
linking shared-object dl.bundle
installing dl libraries
installing default dl libraries
make[2]: Nothing to be done for `all'.
installing default callback libraries
linking shared-object etc.bundle
linking shared-object fcntl.bundle
installing default etc libraries
linking shared-object fiber.bundle
installing default fcntl libraries
linking shared-object fiddle.bundle
installing default fiber libraries
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
installing default fiddle libraries
linking shared-object io/console.bundle
linking shared-object io/nonblock.bundle
installing default console libraries
installing default nonblock libraries
linking shared-object io/wait.bundle
installing default libraries
linking shared-object json/ext/generator.bundle
installing default wait libraries
linking shared-object json/ext/parser.bundle
installing default generator libraries
installing default parser libraries
linking shared-object mathn/complex.bundle
linking shared-object mathn/rational.bundle
installing default complex libraries
installing default rational libraries
linking shared-object nkf.bundle
linking shared-object objspace.bundle
installing default objspace libraries
compiling openssl_missing.c
installing default nkf libraries
linking shared-object pathname.bundle
installing default pathname libraries
linking shared-object psych.bundle
In file included from openssl_missing.c:22:
./openssl_missing.h:71:6: error: conflicting types for 'HMAC_CTX_copy'
void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
     ^
/opt/sm/pkg/active/include/openssl/hmac.h:102:5: note: previous declaration is here
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
    ^
In file included from openssl_missing.c:22:
./openssl_missing.h:95:5: error: conflicting types for 'EVP_CIPHER_CTX_copy'
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in);
    ^
/opt/sm/pkg/active/include/openssl/evp.h:502:5: note: previous declaration is here
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
    ^
openssl_missing.c:26:1: error: conflicting types for 'HMAC_CTX_copy'
HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in)
^
/opt/sm/pkg/active/include/openssl/hmac.h:102:5: note: previous declaration is here
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
    ^
openssl_missing.c:121:1: error: conflicting types for 'EVP_CIPHER_CTX_copy'
EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in)
^
/opt/sm/pkg/active/include/openssl/evp.h:502:5: note: previous declaration is here
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
    ^
4 errors generated.
make[2]: *** [openssl_missing.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
installing default psych libraries
make: *** [build-ext] Error 2
4

3 回答 3

3

花了很多时间试图找到答案并环顾四周,这似乎有效

CC=clang rvm install 2.0.0 -C --enable-shared, --with-openssl-dir=`brew --prefix openssl`
于 2013-06-30T08:19:48.313 回答
1

刚才运行拱门时遇到了类似的问题。之后效果很好

rvm get stable

并按照安装人员给出的说明进行清理。

于 2014-03-12T20:12:30.240 回答
0

好像您没有正确配置 ssl。尝试再次使用--with-openssl-dir=/usr/bin(而不是 /usr/bin 您可以输入您的实际路径,但这是最可能的路径)。

于 2013-06-29T20:43:30.407 回答