在macOS 12.5上安装Ruby 3.1.2时出错



我正在尝试在macOS 12.5上安装Ruby 3.1.2,使用chruby作为我的版本管理器。

运行ruby-install ruby,我得到这个错误:

>>> Extracting ruby-3.1.2.tar.xz to /Users/justin/src/ruby-3.1.2 ...
/usr/local/bin/../share/ruby-install/util.sh: line 56: xzcat: command not found
/usr/local/bin/ruby-install: line 46: cd: /Users/justin/src/ruby-3.1.2: No such file or directory
>>> Regenerating ./configure script ...
autoreconf: error: 'configure.ac' is required
!!! Configuration of ruby 3.1.2 failed!

我不太确定如何解决这个问题。有人给我一些建议吗?

ruby安装中似乎存在跟踪此问题的问题。

我认为ruby安装目前并没有明确地依赖于xz作为依赖项,尽管它们是chruby和ruby安装所必需的。在新版本的ruby安装在自制软件上完全可用之前,您可以手动安装带有的xz

brew install xz

以确保xz(以及xzcat可执行文件(在您的系统上可用。之后,您应该能够安装您的Ruby版本。

最新更新