在Mac OS 10.5.8上通过RVM安装Ruby 1.8.7-p302时运行make时出错 [英] Error running make when installing Ruby 1.8.7-p302 via RVM on Mac OS 10.5.8

查看:86
本文介绍了在Mac OS 10.5.8上通过RVM安装Ruby 1.8.7-p302时运行make时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行"rvm install 1.8.7-p302"会提供以下反馈:

Running "rvm install 1.8.7-p302" provides the following feedback:

rich-macbook:~ rich$ rvm install 1.8.7-p302
Installing Ruby from source to: /Users/rich/.rvm/rubies/ruby-1.8.7-p302, this may take a while depending on your cpu(s)...

ruby-1.8.7-p302 - #fetching 
ruby-1.8.7-p302 - #extracted to /Users/rich/.rvm/src/ruby-1.8.7-p302 (already extracted)
Applying patch 'stdout-rouge-fix' (located at /Users/rich/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ERROR: Error running 'patch -F 25 -p1 -N -f <"/Users/rich/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"', please read /Users/rich/.rvm/log/ruby-1.8.7-p302/patch.apply.stdout-rouge-fix.log
ruby-1.8.7-p302 - #configuring 
ruby-1.8.7-p302 - #compiling 
ERROR: Error running 'make ', please read /Users/rich/.rvm/log/ruby-1.8.7-p302/make.log
ERROR: There has been an error while running make. Halting the installation.

这是第二次尝试安装它;第一次安装补丁程序就很好,但是Ruby本身无法运行make.我最近没有问题地安装了Ruby 1.9.3-p0.

This is the second attempt at installing it; the first time the patch installed fine, but Ruby itself failed running make. I have recently installed Ruby 1.9.3-p0 without problem.

下面是提到的日志文件的输出.

Below is the output of the mentioned log files.

patch.apply.stdout-rouge-fix.log

[2011-12-01 08:06:45] patch -F 25 -p1 -N -f <"/Users/rich/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"
patching file lib/mkmf.rb
Hunk #1 FAILED at 201.
1 out of 1 hunk FAILED -- saving rejects to file lib/mkmf.rb.rej

make.log:

[2011-12-01 08:07:04] make 
/usr/bin/gcc-4.2 -arch x86_64 -g -Os -pipe -no-cpp-precomp  -fno-common -pipe -fno-common    -DRUBY_EXPORT  -L. -arch x86_64 -bind_at_load   main.o dmydln.o libruby-static.a -ldl -lobjc   -o miniruby
rbconfig.rb unchanged
cc -dynamiclib -undefined suppress -flat_namespace -install_name /Users/rich/.rvm/rubies/ruby-1.8.7-p302/lib/libruby.dylib -current_version 1.8.7 -compatibility_version 1.8   array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o  dmyext.o  -o libruby.1.8.7.dylib
ld warning: in array.o, file is not of required architecture
ld warning: in bignum.o, file is not of required architecture
ld warning: in class.o, file is not of required architecture
ld warning: in compar.o, file is not of required architecture
ld warning: in dir.o, file is not of required architecture
ld warning: in dln.o, file is not of required architecture
ld warning: in enum.o, file is not of required architecture
ld warning: in enumerator.o, file is not of required architecture
ld warning: in error.o, file is not of required architecture
ld warning: in eval.o, file is not of required architecture
ld warning: in file.o, file is not of required architecture
ld warning: in gc.o, file is not of required architecture
ld warning: in hash.o, file is not of required architecture
ld warning: in inits.o, file is not of required architecture
ld warning: in io.o, file is not of required architecture
ld warning: in marshal.o, file is not of required architecture
ld warning: in math.o, file is not of required architecture
ld warning: in numeric.o, file is not of required architecture
ld warning: in object.o, file is not of required architecture
ld warning: in pack.o, file is not of required architecture
ld warning: in parse.o, file is not of required architecture
ld warning: in process.o, file is not of required architecture
ld warning: in prec.o, file is not of required architecture
ld warning: in random.o, file is not of required architecture
ld warning: in range.o, file is not of required architecture
ld warning: in re.o, file is not of required architecture
ld warning: in regex.o, file is not of required architecture
ld warning: in ruby.o, file is not of required architecture
ld warning: in signal.o, file is not of required architecture
ld warning: in sprintf.o, file is not of required architecture
ld warning: in st.o, file is not of required architecture
ld warning: in string.o, file is not of required architecture
ld warning: in struct.o, file is not of required architecture
ld warning: in time.o, file is not of required architecture
ld warning: in util.o, file is not of required architecture
ld warning: in variable.o, file is not of required architecture
ld warning: in version.o, file is not of required architecture
ld warning: in dmyext.o, file is not of required architecture
compiling Win32API
compiling bigdecimal
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/bigdecimal.bundle bigdecimal.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling curses
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/curses.bundle curses.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby -lncurses -ltermcap  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling dbm
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/dbm.bundle dbm.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling digest
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/digest.bundle digest.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
cp ../.././ext/digest/digest.h ../../.ext/i686-darwin9.8.0
compiling digest/bubblebabble
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/bubblebabble.bundle bubblebabble.o -L. -L../../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/md5
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/md5.bundle md5init.o md5ossl.o -L. -L../../.. -L. -arch x86_64 -bind_at_load    -lruby -lcrypto  -ldl -lobjc  
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/rmd160
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/rmd160.bundle rmd160init.o rmd160ossl.o -L. -L../../.. -L. -arch x86_64 -bind_at_load    -lruby -lcrypto  -ldl -lobjc  
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/sha1
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/sha1.bundle sha1init.o sha1ossl.o -L. -L../../.. -L. -arch x86_64 -bind_at_load    -lruby -lcrypto  -ldl -lobjc  
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling digest/sha2
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/digest/sha2.bundle sha2.o sha2init.o -L. -L../../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling dl
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/dl.bundle dl.o handle.o ptr.o sym.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby -ldl  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
cp dlconfig.h ../../.ext/i686-darwin9.8.0
cp ../.././ext/dl/dl.h ../../.ext/i686-darwin9.8.0
compiling etc
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/etc.bundle etc.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling fcntl
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/fcntl.bundle fcntl.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling gdbm
compiling iconv
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/iconv.bundle iconv.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby -liconv  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling io/wait
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/io/wait.bundle wait.o -L. -L../../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling nkf
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/nkf.bundle nkf.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling openssl
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/openssl.bundle openssl_missing.o ossl.o ossl_asn1.o ossl_bio.o ossl_bn.o ossl_cipher.o ossl_config.o ossl_digest.o ossl_engine.o ossl_hmac.o ossl_ns_spki.o ossl_ocsp.o ossl_pkcs12.o ossl_pkcs5.o ossl_pkcs7.o ossl_pkey.o ossl_pkey_dh.o ossl_pkey_dsa.o ossl_pkey_ec.o ossl_pkey_rsa.o ossl_rand.o ossl_ssl.o ossl_ssl_session.o ossl_x509.o ossl_x509attr.o ossl_x509cert.o ossl_x509crl.o ossl_x509ext.o ossl_x509name.o ossl_x509req.o ossl_x509revoked.o ossl_x509store.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby -lssl -lcrypto  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling pty
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/pty.bundle pty.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby -lutil  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling racc/cparse
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../../.ext/i686-darwin9.8.0/racc/cparse.bundle cparse.o -L. -L../../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../../libruby.dylib, file is not of required architecture
compiling readline
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/readline.bundle readline.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby -lreadline -lncurses  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling sdbm
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/sdbm.bundle _sdbm.o init.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling socket
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/socket.bundle socket.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling stringio
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/stringio.bundle stringio.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling strscan
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/strscan.bundle strscan.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling syck
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/syck.bundle bytecode.o emitter.o gram.o handler.o implicit.o node.o rubyext.o syck.o token.o yaml2byte.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling syslog
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/syslog.bundle syslog.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling thread
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/thread.bundle thread.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
compiling tk
Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.
compiling tk/tkutil
compiling win32ole
compiling zlib
cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace -o ../../.ext/i686-darwin9.8.0/zlib.bundle zlib.o -L. -L../.. -L. -arch x86_64 -bind_at_load    -lruby -lz  -ldl -lobjc  
ld warning: in ../../libruby.dylib, file is not of required architecture
making ruby
/usr/bin/gcc-4.2 -arch x86_64 -g -Os -pipe -no-cpp-precomp  -fno-common -pipe -fno-common    -DRUBY_EXPORT  -L. -arch x86_64 -bind_at_load   main.o  -lruby -ldl -lobjc   -o ruby
ld warning: in ./libruby.dylib, file is not of required architecture
Undefined symbols:
  "_ruby_options", referenced from:
      _main in main.o
  "_ruby_run", referenced from:
      _main in main.o
  "_ruby_init", referenced from:
      _main in main.o
  "_ruby_init_stack", referenced from:
      _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [ruby] Error 1
make: *** [all] Error 2

如果您需要更多信息,请告诉我.

If you need any more info, let me know.

阅读此线程后,我执行了以下步骤:

I performed the following steps after reading this thread: make error when installing `ruby-1.8.7-p334` with `rvm` on Snow Leopard

  1. rvm pkg install readline
  2. rvm删除1.8.7
  3. rvm全部清除
  4. rvm安装ruby-1.8.7-p302

这已成功安装了补丁程序,表明它是首次安装,因此可以忽略任何后续错误.编译Ruby时仍然出错.由于make日志文件超出了该帖子的字符计数容量,因此您可以在此处查看第二个makefile的内容: http://pastebin .com/MTZjXBdF

This successfully installed the patch, indicating it is installed first time so any subsequent errors can be ignored. It did still error when compiling Ruby. As the make log file exceeds this post's character count capacity, you can view the contents of the second makefile here: http://pastebin.com/MTZjXBdF

推荐答案

不适用于最新版本.但是,可以通过强制它使用已安装rvm的readline使其工作.

Did not work with the latest release. However could get it to work by forcing it to use the rvm installed readline.

rvm install 1.8.7 -C –with-readline-dir = $ rvm_path/usr

rvm install 1.8.7 -C –with-readline-dir=$rvm_path/usr

因此,完整的步骤是:

    rvm pkg install readline 
    rvm remove 1.8.7 
    rvm cleanup all 
    rvm install 1.8.7 -C –with-readline-dir=$rvm_path/usr

感谢Andrew在 http://anlek .com/2011/01/rvm-install-1-8-7-p330-fails/作为指针.

Thanks to Andrew at http://anlek.com/2011/01/rvm-install-1-8-7-p330-fails/ for the pointer.

这篇关于在Mac OS 10.5.8上通过RVM安装Ruby 1.8.7-p302时运行make时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆