Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing Ruby 3.1.2 on macOS 12.5

I'm trying to install Ruby 3.1.2 on macOS 12.5, using chruby as my version manager.

Running ruby-install ruby, I get this error:

>>> 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!

I'm not quite sure how to troubleshoot this. Anybody have some tips for me?

like image 954
Justin Avatar asked May 18 '26 12:05

Justin


1 Answers

There seems to be an issue in ruby-install tracking this.

I appears that ruby-install currently does not explicitly depend on xz as a dependency although they are required for chruby and ruby-install. Until the new version of ruby-install is fully available on homebrew, you can manually install the xz package with

brew install xz

to make sure xz (and thus the xzcat executable) are available on your system. Afterwards, you should be able to install your Ruby version.

like image 85
Holger Just Avatar answered May 20 '26 13:05

Holger Just



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!