【发布时间】:2017-08-07 00:01:45
【问题描述】:
在我的机器(osx 山狮)上安装旧版本的 ruby 时遇到问题。我想知道是否有人对如何解决此编译问题有想法:
$ rvm install 1.8.7
Warning! Requested ruby installation which requires another ruby available - installing ruby-1.8.7-p374 first.
ruby-1.8.7-p374 - #removing src/ruby-1.8.7-p374..
Checking requirements for osx.
Certificates in '/opt/twitter/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/mshahriarinia/.rvm/rubies/ruby-1.8.7-p374, this may take a while depending on your cpu(s)...
ruby-1.8.7-p374 - #downloading ruby-1.8.7-p374, this may take a while depending on your connection...
ruby-1.8.7-p374 - #extracting ruby-1.8.7-p374 to /Users/mshahriarinia/.rvm/src/ruby-1.8.7-p374....
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/1.8.7/no_sslv2.diff.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/GH-488.patch.
ruby-1.8.7-p374 - #applying patch /Users/mshahriarinia/.rvm/patches/ruby/ssl_no_ec2m.patch.
ruby-1.8.7-p374 - #configuring...............................
ruby-1.8.7-p374 - #post-configuration.
ruby-1.8.7-p374 - #compiling............
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/mshahriarinia/.rvm/log/1489619955_ruby-1.8.7-p374/make.log
numeric.c: In function 'flo_is_finite_p':
numeric.c:1238:5: warning: 'finite' is deprecated (declared at /opt/twitter/Cellar/gcc@4.9/4.9.4/lib/gcc/4.9/gcc/x86_64-apple-darwin15.6.0/4.9.4/include-fixed/ math.h:772) [-Wdeprecated-declarations]
if (!finite(value))
^
{standard input}:4857:suffix or operands invalid for `movq'
{standard input}:4860:suffix or operands invalid for `movq'
{standard input}:4869:suffix or operands invalid for `movq'
{standard input}:4885:suffix or operands invalid for `movq'
{standard input}:4889:suffix or operands invalid for `movq'
{standard input}:4896:suffix or operands invalid for `movq'
{standard input}:4898:suffix or operands invalid for `movq'
{standard input}:4900:suffix or operands invalid for `movq'
{standard input}:4914:suffix or operands invalid for `movq'
make: *** [numeric.o] Error 1
+++ return 2
There has been an error while running make. Halting the installation.
To proceed rvm requires a ruby-1.8.7-p374 compatible ruby is installed.
We attempted to install it automatically but it failed with status 2.
Please install it manually (or a compatible alternative) to proceed.
【问题讨论】:
-
Ruby 1.8.7 已经失效,所以此时你可能很难让它在任何东西上运行。如果你真的需要使用它,在 VM 中启动 10.7 可能会有所帮助。上次我不得不这样做时,我不得不在Vagrant 中使用一个非常旧的 Linux 发行版,即使是那些也很烦人,因为你不能再为它们安装软件包,存储库被切断了。要尝试的一件事是改用
rbenv。 -
对这个特定版本没有严格的依赖,任何 ruby
-
使用 1.9.3 比使用 1.8.7 幸运得多。符合您要求的最新版本。
-
1.9.3 也不起作用:pastebin.com/qFLwefhN
-
OS X 10.8 不是带有系统 Ruby this post,您应该已经编译了系统 10.8.7。仅当您想切换到其他东西时,才需要 RVM。
标签: ruby rvm homebrew osx-mountain-lion ruby-1.8.7