【问题标题】:Installing ruby 1.8.7 on Mac 10.8 via RVM Compilation通过 RVM 编译在 Mac 10.8 上安装 ruby​​ 1.8.7
【发布时间】: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


【解决方案1】:

看起来问题出在XCODE。 通过运行检查您是否已过期 XCODE

softwareupdate --list

如果XCODE 已过期,请更新

softwareupdate --install <product name>

否则,如果缺少XCODE,请运行以下命令进行安装:

xcode-select --install

来源:https://github.com/rvm/rvm/issues/3577

【讨论】:

  • xcode 是最新的:$ softwareupdate --list 软件更新工具 版权所有 2002-2015 Apple Inc. 查找可用软件 没有可用的新软件。
  • 你是否可以通过在终端中运行open -a Xcode 来获取xcode 窗口?
  • 我放弃了。有太多的依赖项不起作用。感谢您的帮助
猜你喜欢
  • 2012-09-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-15
  • 2013-09-24
  • 1970-01-01
  • 2012-10-18
  • 1970-01-01
相关资源
最近更新 更多