在旧的Mac OS 10.7.5 Lion上安装Ruby 2.0.0

时间:2017-08-27 10:02:54

标签: ruby-on-rails ruby macos homebrew osx-lion

我试图在我得到的旧Mac上升级Ruby版本,但没有任何成功。

我知道这可能是因为this guy here asking how to upgrade from 2.2

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

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"缺少所以我设法自己安装它,但没有成功:

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.

此外,我已尝试按照此comment

按照从源安装coreutils的步骤进行操作
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之后再次出于同样的原因再次失败。

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

1 个答案:

答案 0 :(得分:1)

Homebrew不支持macOS 10.7。您可以使用Section 11.6.7.16 of the Wireshark Developer's Guide,一个Homebrew的分支,“它可以增加对PowerPC Mac的支持,以及运行Tiger或Leopard的Mac”(引用其主页)。