本文介绍了在旧的Mac OS 10.7.5 Lion上安装Ruby 2.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾尝试在我购买的旧Mac上升级Ruby版本,但没有成功.

I have tried to upgrade the Ruby version on an old Mac I got, but without any success.

由于这里的家伙,我知道它的可能询问如何从2.2升级

这是我在终端中输入的内容:

Here is what I entered in the Terminal:

rvm install 2.0.0

结果:

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.7/x86_64/ruby-2.0.0-p648.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system................
Installing required packages: coreutils.....There were package installation errors, make sure to read the log.

Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

Check Homebrew requirements https://github.com/Homebrew/homebrew/wiki/Installation
...
Error running 'requirements_osx_brew_libs_install coreutils',
please read /Users/DAN26/.rvm/log/1503823469_ruby-2.0.0-p648/package_install_coreutils.log
Requirements installation failed with status: 1.

似乎缺少"coreutils",所以我设法自己安装了它,但是没有成功:

Seems like "coreutils" is missing so I manage to install it by my self, however without success:

brew install coreutils

==> Downloading https://ftp.gnu.org/gnu/coreutils/coreutils-8.27.tar.xz
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils-8.27.tar.xz
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--patch-df9bedeae2ca6d335147b5b4c3f19db2f36ff8c84973fd15fe1697de70538247.diff
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--patch-f7e2b21f04085f589c3d10c2f6ac5a4185e2b907e8bdb5bb6e4f93888d7ab546.diff
==> Patching
==> Applying patch-m4_gnulib-comp.m4-add-renameat.diff
patching file m4/gnulib-comp.m4
==> Applying patch-lib_gnulib.mk-add-renameat.c.diff
patching file lib/gnulib.mk
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--renameat_c-8.27.c
==> Downloading https://raw.githubusercontent.com/macports/macports-ports/61f1b0d/sysutils/coreutils/f
Already downloaded: /Users/DAN26/Library/Caches/Homebrew/coreutils--renameat_m4-8.27.m4
==> autoreconf -fiv
==> ./configure --prefix=/usr/local/Cellar/coreutils/8.27 --program-prefix=g --without-gmp
==> make install
Last 15 lines from /Users/DAN26/Library/Logs/Homebrew/coreutils/03.make:
  src/ginstall -c src/truncate '/usr/local/Cellar/coreutils/8.27/bin/./gtruncate'
  src/ginstall -c src/tsort '/usr/local/Cellar/coreutils/8.27/bin/./gtsort'
  src/ginstall -c src/tty '/usr/local/Cellar/coreutils/8.27/bin/./gtty'
  src/ginstall -c src/uname '/usr/local/Cellar/coreutils/8.27/bin/./guname'
  src/ginstall -c src/unexpand '/usr/local/Cellar/coreutils/8.27/bin/./gunexpand'
  src/ginstall -c src/uniq '/usr/local/Cellar/coreutils/8.27/bin/./guniq'
  src/ginstall -c src/unlink '/usr/local/Cellar/coreutils/8.27/bin/./gunlink'
  src/ginstall -c src/vdir '/usr/local/Cellar/coreutils/8.27/bin/./gvdir'
  src/ginstall -c src/wc '/usr/local/Cellar/coreutils/8.27/bin/./gwc'
  src/ginstall -c src/whoami '/usr/local/Cellar/coreutils/8.27/bin/./gwhoami'
  src/ginstall -c src/yes '/usr/local/Cellar/coreutils/8.27/bin/./gyes'
  src/ginstall -c src/ginstall '/usr/local/Cellar/coreutils/8.27/bin'
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!


Error: You are using macOS 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

我还尝试通过此

wget https://ftpmirror.gnu.org/coreutils/coreutils-8.25.tar.xz
tar xJf coreutils-8.25.tar.xz
cd coreutils-8.25/
./configure --prefix=/usr/local
make
sudo make install

但是在此之后,由于相同的原因,尝试重新安装Ruby 2.0.0再次失败.

But after that retry to install Ruby 2.0.0 fail again for the same reason.

有人可以帮我解决这个问题吗?

Can someone please help me to solve this problem?

推荐答案

Homebrew不支持macOS 10.7.您可以使用 Tigerbrew ,它是Homebrew的分支,它增加了对PowerPC Mac和运行Mac的支持老虎还是豹子"(引用其主页).

Homebrew doesn’t support macOS 10.7. You can use Tigerbrew, a fork of Homebrew "that adds support for PowerPC Macs, and Macs running Tiger or Leopard" (quoting its homepage).

这篇关于在旧的Mac OS 10.7.5 Lion上安装Ruby 2.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 11:37