Home > other >  Installing Ruby with rbenv on Arm Mac (M1 Chip) giving errors
Installing Ruby with rbenv on Arm Mac (M1 Chip) giving errors

Time:10-17

I'm having a few issues with installing Ruby 2.6.6 using rbenv on the Arm Mac (M1 Chip), which works for my teammate, who has an intel processor. I've tried these solutions (1, 2, & 3) to no avail.

Error log:

To follow progress, use 'tail -f /var/folders/rb/hwbl5pxd5zs4gzzx5pdljhjw0000gq/T/ruby-build.20221014163104.57025.log' or pass --verbose
Downloading ruby-2.6.6.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.bz2



Installing ruby-2.6.6...
ruby-build: using readline from homebrew





BUILD FAILED (macOS 12.6 using ruby-build 20221004)

Inspect or clean up the working tree at /var/folders/rb/hwbl5pxd5zs4gzzx5pdljhjw0000gq/T/ruby-build.20221014163104.57025.x3LvP2
Results logged to /var/folders/rb/hwbl5pxd5zs4gzzx5pdljhjw0000gq/T/ruby-build.20221014163104.57025.log

Last 10 log lines:
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __darwin_fd_clr
transform_mjit_header: SKIPPED to transform __darwin_fd_set
transform_mjit_header: SKIPPED to transform __darwin_fd_isset
transform_mjit_header: SKIPPED to transform __darwin_check_fd_set
transform_mjit_header: SKIPPED to transform __sputc
transdb.h updated
ln -sf ../../../.ext/include/-darwin21/rb_mjit_min_header-2.6.6.h include/ruby-2.6.0/-darwin21/rb_mjit_min_header-2.6.6.h

From my research it seems related to OpenSSL. However, I think I have the proper version. On running brew list I get:

==> Formulae
autoconf    c-ares      icu4c       libevent    libnghttp2  lz4     mysql       [email protected] [email protected] ruby        six     zlib
awscli      ca-certificates jq      libffi      libuv       m4      node        pkg-config  rbenv       ruby-build  sqlite      zstd
brotli      gdbm        libcbor     libfido2    libyaml     mpdecimal   oniguruma   protobuf    readline    saml2aws    xz

==> Casks
google-cloud-sdk

And on running brew info openssl I get:

==> openssl@3: stable 3.0.5 (bottled) [keg-only]
Cryptography and SSL/TLS Toolkit
https://openssl.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/[email protected]
License: Apache-2.0
==> Dependencies
Required: ca-certificates ✔
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /opt/homebrew/etc/openssl@3/certs

and run
  /opt/homebrew/opt/openssl@3/bin/c_rehash

openssl@3 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides LibreSSL.

==> Analytics
install: 159,362 (30 days), 444,743 (90 days), 1,589,438 (365 days)
install-on-request: 99,536 (30 days), 319,581 (90 days), 1,219,775 (365 days)
build-error: 4,303 (30 days)

Could you confirm that my assumptions are correct?

I'll be grateful for any help on these issues. Thank you!

CodePudding user response:

Moving away from 2.6.6 to 2.7.6 seemed to have worked! So rbenv install 2.7.6 is what it came down to. In any case, 2.6.6 seemed to have some security issues, so better to update.

  • Related