繁体   English   中英

在OSX 10.4上安装带有RVM的Ruby 1.9.2的问题

[英]Problem installing Ruby 1.9.2 with RVM on OSX 10.4

我在OS 10.4上成功安装了带RVM的Ruby 1.8.7。 但是,当我尝试安装1.9.2时,我收到以下错误:make: * [libruby.1.9.1.dylib]错误1

安装:

[qm]$ rvm install 1.9.2  
/Users/qm/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...
%  
ruby-1.9.2-p136 - #fetching %  
ruby-1.9.2-p136 - #downloading ruby-1.9.2-p136, this may take a while depending on your connection...%  
ruby-1.9.2-p136 - #extracting ruby-1.9.2-p136 to /Users/qm/.rvm/src/ruby-1.9.2-p136%  
ruby-1.9.2-p136 - #extracted to /Users/qm/.rvm/src/ruby-1.9.2-p136%  
ruby-1.9.2-p136 - #configuring %  
ruby-1.9.2-p136 - #compiling %  
Error running 'make ', please read /Users/qm/.rvm/log/ruby-1.9.2-p136/make.log%  
There has been an error while running make. Halting the installation.%  

/Users/qm/.rvm/log/ruby-1.9.2-p136/make.log的结尾:

gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long  -fno-common -pipe -I. -I.ext/include/powerpc-darwin8.11.0 -I./include -I. -DRUBY_EXPORT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -o prelude.o -c prelude.c  
ar rcu libruby.1.9.1-static.a dln.o encoding.o version.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o alloca.o prelude.o dmyext.o  
gcc -dynamiclib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/qm/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1  -Wl,-u,_objc_msgSend    dln.o encoding.o version.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o alloca.o prelude.o dmyext.o  -o libruby.1.9.1.dylib  
ld: flag: -undefined dynamic_lookup can't be used with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1  
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed  
make: *** [libruby.1.9.1.dylib] Error 1  

感谢您的任何帮助/建议!

瞧! 再次检查我以前的make.log文件中的错误我发现可能是读取线存在问题,所以我结合了一些提示,首先是从noodl设置env var,然后是第二个来自RVM网站http://rvm.beginrescueend。 com / packages / readline /更新readline并在rvm ruby​​ 1.9.2安装期间使用它。

所以,在今天我在这个帖子中的第一篇文章之前,我做了:

$ rvm package install readline

获取最新的readline库。

我之后所做的如下:

$ rvm remove 1.9.2
Removing /Users/mdziurla/.rvm/src/ruby-1.9.2-p136...%
it seems that /Users/mdziurla/.rvm/rubies/ruby-1.9.2-p136 is already non existent.%
Removing ruby-1.9.2-p136 aliases...%
Removing ruby-1.9.2-p136 wrappers...%
Removing ruby-1.9.2-p136 environments...%
Removing ruby-1.9.2-p136 binaries...%
$ MACOSX_DEPLOYMENT_TARGET=10.4 rvm install 1.9.2 --with-readline-dir=$rvm_path/usr
/Users/mdziurla/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...
%
ruby-1.9.2-p136 - #fetching %
ruby-1.9.2-p136 - #extracting ruby-1.9.2-p136 to /Users/mdziurla/.rvm/src/ruby-1.9.2-p136%
ruby-1.9.2-p136 - #extracted to /Users/mdziurla/.rvm/src/ruby-1.9.2-p136%
ruby-1.9.2-p136 - #configuring %
ruby-1.9.2-p136 - #compiling %
ruby-1.9.2-p136 - #installing %
ruby-1.9.2-p136 - updating #rubygems for /Users/mdziurla/.rvm/gems/ruby-1.9.2-p136@global%
ruby-1.9.2-p136 - updating #rubygems for /Users/mdziurla/.rvm/gems/ruby-1.9.2-p136%
ruby-1.9.2-p136 - adjusting #shebangs for (gem).%
ruby-1.9.2-p136 - #importing default gemsets (/Users/mdziurla/.rvm/gemsets/)%
Install of ruby-1.9.2-p136 - #complete %

一切准备就绪。

$ rvm 1.9.2
$ ruby -v
ruby 1.9.2p136 (2010-12-25 revision 30365) [powerpc-darwin8.11.0]

祝好运!

首先安装Homebrew -Tiger在Ruby Dev方面存在一些问题,Brew将帮助解决它们。 一旦安装就可以了。

brew install ruby

我在Mac OS X 10.4.11 Tiger(PPC)上尝试安装ruby 1.9.2时遇到了同样的问题。 我已成功通过RVM编译并安装了ruby 1.9.1,但是1.9.2和1.8.7都没有使用RVM遇到的相同问题。 我执行了以下步骤来获取此错误。

$ ruby -v
ruby 1.8.7 (2008-05-31 patchlevel 0) [powerpc-darwin8.11.0]
$ rvm --version
rvm 1.2.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
$ rvm install 1.9.2
/Users/mdziurla/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...
%
ruby-1.9.2-p136 - #fetching %
ruby-1.9.2-p136 - #extracting ruby-1.9.2-p136 to /Users/mdziurla/.rvm/src/ruby-1.9.2-p136%
ruby-1.9.2-p136 - #extracted to /Users/mdziurla/.rvm/src/ruby-1.9.2-p136%
ruby-1.9.2-p136 - #configuring %
ruby-1.9.2-p136 - #compiling %
Error running 'make ', please read /Users/mdziurla/.rvm/log/ruby-1.9.2-p136/make.log%
There has been an error while running make. Halting the installation.%

我的make.log输出你可以在http://www.pastie.org/1467180找到

有没有人试过改变那个env var?

MACOSX_DEPLOYMENT_TARGET=10.4 rvm install 1.9.2

几分钟前,按照noodl的提示进行操作,我尝试设置env var并遇到类似的问题。 仍未安装ruby 1.9.2。 下面是我做的:

$ rvm remove 1.9.2
Removing /Users/mdziurla/.rvm/src/ruby-1.9.2-p136...%
it seems that /Users/mdziurla/.rvm/rubies/ruby-1.9.2-p136 is already non existent.%
Removing ruby-1.9.2-p136 aliases...%
Removing ruby-1.9.2-p136 wrappers...%
Removing ruby-1.9.2-p136 environments...%
Removing ruby-1.9.2-p136 binaries...%
$ MACOSX_DEPLOYMENT_TARGET=10.4 rvm install 1.9.2
/Users/mdziurla/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...
%
ruby-1.9.2-p136 - #fetching %
ruby-1.9.2-p136 - #extracting ruby-1.9.2-p136 to /Users/mdziurla/.rvm/src/ruby-1.9.2-p136%
ruby-1.9.2-p136 - #extracted to /Users/mdziurla/.rvm/src/ruby-1.9.2-p136%
ruby-1.9.2-p136 - #configuring %
ruby-1.9.2-p136 - #compiling %
Error running 'make ', please read /Users/mdziurla/.rvm/log/ruby-1.9.2-p136/make.log%
There has been an error while running make. Halting the installation.%

您可以在http://www.pastie.org/1467265找到make.log输出

暂无
暂无

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

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