尝试在Mac OS X 10.14.5上通过rbenv安装Ruby时失败

时间:2019-05-23 07:33:23

标签: ruby-on-rails ruby macos rbenv

我正在尝试使用rbenv安装Ruby,但是它总是以BUILD FAILED消息结尾。

我尝试重新安装Xcode,rbenv和homebrew,但没有成功。

我正在跑步:

rbenv install 2.6.3

我的目标是获得某种安装成功消息,但是经过多次尝试后,我仍然不断获得BUILD FAILED。

这是我从配置摘要中得到的:

Configuration summary for ruby version 2.6.3

   * Installation prefix: /Users/New32/.rbenv/versions/2.6.3
   * exec prefix:         ${prefix}
   * arch:                x86_64-darwin18
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           darwin18
   * compiler:            clang
   * with pthread:        yes
   * enable shared libs:  no
   * dynamic library ext: bundle
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -L/Users/New32/.rbenv/versions/2.6.3/lib  \
                          -fstack-protector-strong -L/usr/local/lib
   * DLDFLAGS:            -L/Users/New32/.rbenv/versions/2.6.3/lib  \
                          -Wl,-undefined,dynamic_lookup \
                          -Wl,-multiply_defined,suppress
   * optflags:            -O3
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeclaration-after-statement \
                          -Wdeprecated-declarations -Wdivision-by-zero \
                          -Wimplicit-function-declaration -Wimplicit-int \
                          -Wpointer-arith -Wshorten-64-to-32 \
                          -Wwrite-strings -Wmissing-noreturn \
                          -Wno-constant-logical-operand -Wno-long-long \
                          -Wno-missing-field-initializers \
                          -Wno-overlength-strings -Wno-parentheses-equality \
                          -Wno-self-assign -Wno-tautological-compare \
                          -Wno-unused-parameter -Wno-unused-value \
                          -Wunused-variable -Wextra-tokens
   * strip command:       strip -A -n
   * install doc:         yes
   * JIT support:         yes
   * man page type:       doc

---
    BASERUBY = /usr/bin/ruby --disable=gems
    CC = clang
    LD = ld
    LDSHARED = clang -dynamiclib
    CFLAGS = -O3 -Wno-error=shorten-64-to-32  -pipe 
    XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE -DCANONICALIZATION_FOR_MATHN
    CPPFLAGS = -I/Users/New32/.rbenv/versions/2.6.3/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin18 -I./include -I. -I./enc/unicode/12.1.0 
    DLDFLAGS = -L/Users/New32/.rbenv/versions/2.6.3/lib  -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector-strong -Wl,-pie -framework Security -framework Foundation  
    SOLIBS = -lpthread -ldl -lobjc
    LANG = en_US.UTF-8
    LC_ALL = 
    LC_CTYPE = 
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
translating probes probes.d
compiling ast.c
compiling bignum.c
compiling class.c
. ./vm_opts.h
compiling compar.c
compiling compile.c
compiling complex.c
compiling cont.c
compiling debug.c
compiling debug_counter.c
compiling dir.c
compiling dln_find.c
compiling encoding.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling iseq.c
compiling load.c
compiling marshal.c
compiling math.c
making mjit_config.h
compiling mjit_compile.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling proc.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling symbol.c
compiling thread.c
compiling time.c
compiling transcode.c
compiling transient_heap.c
compiling util.c
compiling variable.c
./revision.h unchanged
compiling vm.c
compiling vm_backtrace.c
compiling vm_dump.c
compiling vm_trace.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling addr2line.c
compiling dmyenc.c
compiling dln.c
compiling localeinit.c
compiling prelude.c
compiling array.c
compiling mjit.c
assembling coroutine/amd64/Context.S
compiling enc/ascii.c
compiling enc/us_ascii.c
compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
compiling version.c
building rb_mjit_header.h
linking miniruby
rb_mjit_header.h updated
warning: no debug symbols in executable (-arch x86_64)
generating encdb.h
building .ext/include/x86_64-darwin18/rb_mjit_min_header-2.6.3.h
./miniruby -I./lib -I. -I.ext/common  ./tool/transform_mjit_header.rb "clang " rb_mjit_header.h .ext/include/x86_64-darwin18/rb_mjit_min_header-2.6.3.h
encdb.h updated
./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp
rbconfig.rb updated
generating enc.mk
creating verconf.h
verconf.h updated
compiling loadpath.c
making srcs under enc
linking static-library libruby.2.6-static.a
make[1]: Nothing to be done for `srcs'.
generating transdb.h
/opt/local/bin/ranlib: object: libruby.2.6-static.a(dln.o) malformed object (unknown load command 1)
ar: internal ranlib command failed
make: *** [libruby.2.6-static.a] Error 1
make: *** Waiting for unfinished jobs....
transdb.h updated

Transforming external functions to static:
transform_mjit_header: making external definition of 'Init_vm_stack_canary' static inline
transform_mjit_header: making external definition of 'rb_vm_opt_struct_aset' static inline
transform_mjit_header: making external definition of 'rb_vm_opt_struct_aref' static inline
transform_mjit_header: making external definition of 'rb_eql_opt' static inline
transform_mjit_header: changing definition of 'rb_equal_opt' to declaration
transform_mjit_header: changing definition of 'rb_vm_search_method_slowpath' to declaration
transform_mjit_header: making external definition of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making external definition of 'rb_vm_push_frame' static inline
transform_mjit_header: making external definition of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making external definition of 'rb_vm_cref_new_toplevel' static inline
transform_mjit_header: making external definition of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making external definition of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: making declaration of 'rb_vm_rewrite_cref' static inline
transform_mjit_header: making declaration of 'rb_vm_frame_block_handler' static inline
transform_mjit_header: making declaration of 'rb_vm_block_ep_update' static inline
transform_mjit_header: making declaration of 'rb_vm_ep_local_ep' static inline
transform_mjit_header: SKIPPED to transform __sigbits
transform_mjit_header: making declaration of 'Init_vm_stack_canary' static inline
transform_mjit_header: making declaration of 'rb_eql_opt' static inline
transform_mjit_header: SKIPPED to transform __sincospi
transform_mjit_header: SKIPPED to transform __sincospif
transform_mjit_header: SKIPPED to transform __sincos
transform_mjit_header: SKIPPED to transform __sincosf
transform_mjit_header: SKIPPED to transform __inline_isnormall
transform_mjit_header: SKIPPED to transform __inline_isnormald
transform_mjit_header: SKIPPED to transform __inline_isnormalf
transform_mjit_header: SKIPPED to transform __inline_signbitl
transform_mjit_header: SKIPPED to transform __inline_signbitd
transform_mjit_header: SKIPPED to transform __inline_signbitf
transform_mjit_header: SKIPPED to transform __inline_isnanl
transform_mjit_header: SKIPPED to transform __inline_isnand
transform_mjit_header: SKIPPED to transform __inline_isnanf
transform_mjit_header: SKIPPED to transform __inline_isinfl
transform_mjit_header: SKIPPED to transform __inline_isinfd
transform_mjit_header: SKIPPED to transform __inline_isinff
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __sputc
ln -sf ../../../.ext/include/x86_64-darwin18/rb_mjit_min_header-2.6.3.h include/ruby-2.6.0/x86_64-darwin18/rb_mjit_min_header-2.6.3.h

BUILD FAILED (OS X 10.14.5 using ruby-build 20190423)

Inspect or clean up the working tree at /var/folders/l4/1sgxbx9n6_v207xt24hb52th0000gn/T/ruby-build.20190522234118.3484
Results logged to /var/folders/l4/1sgxbx9n6_v207xt24hb52th0000gn/T/ruby-build.20190522234118.3484.log

Last 10 log lines:
transform_mjit_header: SKIPPED to transform __inline_isnand
transform_mjit_header: SKIPPED to transform __inline_isnanf
transform_mjit_header: SKIPPED to transform __inline_isinfl
transform_mjit_header: SKIPPED to transform __inline_isinfd
transform_mjit_header: SKIPPED to transform __inline_isinff
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __sputc
ln -sf ../../../.ext/include/x86_64-darwin18/rb_mjit_min_header-2.6.3.h include/ruby-2.6.0/x86_64-darwin18/rb_mjit_min_header-2.6.3.h

对此我还很陌生,如果这是一个简单的问题,请尝试事先学习道歉。

谢谢!

1 个答案:

答案 0 :(得分:0)

问题似乎与readline有关,您应该将此Post检出。有关更多详细信息,请访问此rbenv问题https://github.com/sstephenson/rbenv/issues/579#issuecomment-41122071

相关问题