rbenv无法安装ruby-1.9.3-p551

时间:2016-09-20 08:44:28

标签: ruby-on-rails ruby rbenv

我在运行ElCapitan的计算机上安装特定的ruby版本时遇到问题。 版本号为1.9.3-p551。

它说:BUILD FAILED(OS X 10.11.6使用ruby-build 20160426)

这是日志文件(部分内容):

/tmp/ruby-build.20160920112831.62235 ~/Desktop/localhost/project
/tmp/ruby-build.20160920112831.62235/ruby-1.9.3-p551 /tmp/ruby-build.20160920112831.62235 ~/Desktop/localhost/project
configure: WARNING: unrecognized options: --with-openssl-dir, --with-libyaml-dir, --with-readline-dir
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking target system type... x86_64-apple-darwin15.6.0
checking whether the C compiler works... yes

[..]


compiling class.c
bignum.c:1449:23: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
                if (a > 0.0) return INT2FIX(-1);
                                    ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:1460:51: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    if (RBIGNUM_SIGN(x) < RBIGNUM_SIGN(y)) return INT2FIX(-1);
                                                  ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:1462:29: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
        return (RBIGNUM_SIGN(x)) ? INT2FIX(-1) : INT2FIX(1);
                                   ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:1464:42: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
        return (RBIGNUM_SIGN(x)) ? INT2FIX(1) : INT2FIX(-1);
                                                ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:1472:34: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
        (RBIGNUM_SIGN(x) ? INT2FIX(1) : INT2FIX(-1)) :
                                        ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:1473:25: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
            (RBIGNUM_SIGN(x) ? INT2FIX(-1) : INT2FIX(1));
                               ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:1493:22: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
                if (a > 0.0) rel = INT2FIX(-1);
                                   ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:1680:20: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    if (!i) return INT2FIX(~(SIGNED_VALUE)0);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:3414:40: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
        return RBIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(-1);
                                              ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:3538:13: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
            return INT2FIX(-1);
                   ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
bignum.c:3548:14: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
        else return INT2FIX(-1);
                    ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
array.c:3341:12: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    return INT2FIX(-1);
           ^~~~~~~~~~~
./include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^

[..]


linking shared-object pty.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
linking shared-object psych.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
installing default pty libraries
compiling cparse.c
installing default psych libraries
compiling ossl_cipher.c
compiling readline.c
compiling ossl_config.c
installing default cparse libraries
linking shared-object racc/cparse.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling ossl_digest.c
compiling ripper.c
installing default readline libraries
linking shared-object readline.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling ossl_engine.c
compiling _sdbm.c
ripper.y:6191:5: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    nd_set_line(lex_strterm, ruby_sourceline);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../node.h:278:43: note: expanded from macro 'nd_set_line'
    RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))
                                        ~~^
compiling ossl_hmac.c
compiling init.c
compiling ossl_ns_spki.c
compiling ossl_ocsp.c
linking shared-object nkf.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
installing default sdbm libraries
linking shared-object sdbm.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
generating constant definitions
ossl_ocsp.c:749:5: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    DefOCSPConst(REVOKED_STATUS_NOSTATUS);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ocsp.c:740:52: note: expanded from macro 'DefOCSPConst'
#define DefOCSPConst(x) rb_define_const(mOCSP, #x, INT2NUM(OCSP_##x))
                                                   ^~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:973:21: note: expanded from macro 'INT2NUM'
# define INT2NUM(v) INT2FIX((int)(v))
                    ^~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
compiling stringio.c
generating constant definitions
compiling basicsocket.c
1 warning generated.
compiling ossl_pkcs12.c
compiling socket.c
compiling ossl_pkcs5.c
installing default stringio libraries
linking shared-object stringio.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling ossl_pkcs7.c
compiling ipsocket.c
compiling strscan.c
compiling tcpsocket.c
compiling tcpserver.c
compiling sockssocket.c
compiling ossl_pkey.c
installing default strscan libraries
linking shared-object strscan.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling udpsocket.c
compiling ossl_pkey_dh.c
compiling unixsocket.c
compiling ossl_pkey_dsa.c
compiling unixserver.c
compiling option.c
compiling bytecode.c
compiling ossl_pkey_ec.c
compiling emitter.c
compiling ancdata.c
compiling ossl_pkey_rsa.c
compiling gram.c
compiling raddrinfo.c
compiling handler.c
compiling ossl_rand.c
compiling implicit.c
compiling ossl_ssl.c
ossl_ssl.c:987:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
            if (rc = SSL_shutdown(ssl))
                ~~~^~~~~~~~~~~~~~~~~~~
ossl_ssl.c:987:13: note: place parentheses around the assignment to silence this warning
            if (rc = SSL_shutdown(ssl))
                   ^
                (                     )
ossl_ssl.c:987:13: note: use '==' to turn this assignment into an equality comparison
            if (rc = SSL_shutdown(ssl))
                   ^
                   ==
ossl_ssl.c:1993:5: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    ossl_ssl_def_const(OP_ALL);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:1973:57: note: expanded from macro 'ossl_ssl_def_const'
#define ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2NUM(SSL_##x))
                                                        ^~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:973:21: note: expanded from macro 'INT2NUM'
# define INT2NUM(v) INT2FIX((int)(v))
                    ^~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
compiling node.c
compiling init.c
compiling rubyext.c
compiling constants.c
2 warnings generated.
compiling ossl_ssl_session.c
compiling ossl_x509.c
compiling syck.c
compiling ossl_x509attr.c
compiling token.c
compiling ossl_x509cert.c
installing default socket libraries
linking shared-object socket.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling syslog.c
installing default syslog libraries
linking shared-object syslog.bundle
compiling ossl_x509crl.c
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
compiling stubs.c
In file included from stubs.c:16:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
#       include <X11/Xlib.h>
                ^
1 error generated.
make[2]: *** [stubs.o] Error 1
make[1]: *** [ext/tk/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling yaml2byte.c
compiling ossl_x509ext.c
compiling ossl_x509name.c
linking shared-object syck.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
ossl_x509name.c:290:28: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    if (result < 0) return INT2FIX(-1);
                           ^~~~~~~~~~~
../.././include/ruby/ruby.h:225:48: note: expanded from macro 'INT2FIX'
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                            ~~~~~~~~~~~~~~~~~~~^
checking ../.././parse.y and ../.././ext/ripper/eventids2.c
installing default syck libraries
compiling ossl_x509req.c
compiling ossl_x509revoked.c
1 warning generated.
installing default ripper libraries
compiling ossl_x509store.c
installing default openssl libraries
linking shared-object openssl.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
1 warning generated.
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/Users/indulis/.rbenv/versions/1.9.3-p551/lib'
make: *** [build-ext] Error 2

我不确定如何修复它。

0 个答案:

没有答案