![](/img/trans.png)
[英]Error with gem install sqlite3 on MacOS Monterey with Ruby 3.0.2 on Apple Silicon M1
[英]How to install Ruby 3.1.0 on MacOS Monterey
我正在嘗試在 MacOS Monterey v12.0.1 上使用 RVM 安裝 Ruby 3.1.0,但它在編譯時返回錯誤。
我嘗試更新 Homebrew,卸載並重新安裝所有內容,但我遇到了同樣的錯誤。
這是終端 window 中的錯誤:
ruby-3.1.0 - #removing src/ruby-3.1.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.0/x86_64/ruby-3.1.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/sindhuja.n/.rvm/rubies/ruby-3.1.0, this may take a while depending on your cpu(s)...
ruby-3.1.0 - #downloading ruby-3.1.0, this may take a while depending on your connection...
ruby-3.1.0 - #extracting ruby-3.1.0 to /Users/sindhuja.n/.rvm/src/ruby-3.1.0 - please wait
ruby-3.1.0 - #configuring - please wait
ruby-3.1.0 - #post-configuration - please wait
ruby-3.1.0 - #compiling - please wait
Error running '__rvm_make -j12',
please read /Users/sindhuja.n/.rvm/log/1643979372_ruby-3.1.0/make.log
There has been an error while running make. Halting the installation.
這是錯誤日志文件:
building .ext/include/x86_64-darwin21/rb_mjit_min_header-3.1.0.h
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h updated
linking shared-library libruby.3.1.dylib
error in initial header file:
In file included from /var/folders/ky/347m_s3x7d15w435j_pvl2cc0000gn/T/20220204-43863-1rn0v3.c:1:
/var/folders/ky/347m_s3x7d15w435j_pvl2cc0000gn/T/20220204-43863-34xdve.h:7176:66: fatal error: expected identifier or '('
pthread_override_qos_class_end_np(pthread_override_t __override);#pragma clang assume_nonnull end
^
1 error generated.
make: *** [.ext/include/x86_64-darwin21/rb_mjit_min_header-3.1.0.h] Error 1
make: *** Waiting for unfinished jobs....
+__rvm_make:0> return
我對 rbenv 3.1.0 和 Monterey12.3beta 和 Xcode13.3beta 有同樣的錯誤。 但是一旦我切換到 Xcode13.0,錯誤就消失了。
我猜這個錯誤是由於 clang 版本引起的或與之相關的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.