我在Arm Mac(M1芯片)上使用rbenv
安装Ruby 2.6.6时遇到了一些问题,我的队友使用了英特尔处理器。我已经尝试了这些解决方案(1、2和3),但没有效果。
错误日志:
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
从我的研究来看,它似乎与OpenSSL有关。然而,我认为我有正确的版本。在运行brew list
时,我得到:
==> Formulae
autoconf c-ares icu4c libevent libnghttp2 lz4 mysql openssl@1.1 python@3.10 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
在运行brew info openssl
时,我得到:
==> 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/openssl@3.rb
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)
你能证实我的假设是正确的吗?
我将感激在这些问题上的任何帮助。谢谢!
1条答案
按热度按时间kmpatx3s1#
从
2.6.6
转移到2.7.6
似乎起了作用!所以rbenv install 2.7.6
就是它的归宿。无论如何,2.6.6
似乎有一些安全问题,所以最好更新。