[英]Ruby 2.7.4 & 3.0.0 fails on macOS Big Sur (11.2.3): undeclared identifier RSA_SSLV23_PADDING
[英]Ruby installation (2.2.2) fails in macOS Big Sur
我在 macOS Big Sur 上安裝 Ruby 2.2.2 時遇到了一些麻煩。 有沒有人遇到過他們能夠解決的類似問題? 非常感謝
錯誤:
`Downloading openssl-1.0.2u.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
Installing openssl-1.0.2u...
Installed openssl-1.0.2u to /Users/findum/.rbenv/versions/2.2.2
Downloading ruby-2.2.2.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2
Installing ruby-2.2.2...
WARNING: ruby-2.2.2 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (macOS 11.1 using ruby-build 20201225)
Inspect or clean up the working tree at /var/folders/x8/g8yqvrh55gq0wds4hny1t94r0000gn/T/ruby-build.20210101111906.42540.uFRvAN
Results logged to /var/folders/x8/g8yqvrh55gq0wds4hny1t94r0000gn/T/ruby-build.20210101111906.42540.log
Last 10 log lines:
compiling ../.././ext/psych/yaml/parser.c
linking shared-object json/ext/parser.bundle
linking shared-object pathname.bundle
installing default psych libraries
linking shared-object json/ext/generator.bundle
linking shared-object bigdecimal.bundle
linking shared-object psych.bundle
linking shared-object nkf.bundle
linking shared-object date_core.bundle
make: *** [build-ext] Error 2`
看起來 OP 編輯了原始消息中的錯誤,因此以下答案不再相關。 留在這里留給后人。
基於 rbenv repo 上幾個 Github 問題的討論,
聽起來 Apple 將默認CFLAGS
更改為 xcode 12 的一部分,這使得一些本機擴展安裝 go 變得混亂。 聽起來這些問題中提出的解決方案是
CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.2.2
該錯誤指出由於擴展問題而失敗
The Ruby readline extension was not compiled.
The Ruby zlib extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
所以我建議先嘗試手動安裝這些擴展,然后重試 ruby 安裝。
用沖泡:
brew install readline
brew install zlib
ruby-build
的 github 也有一些問題可能會有所幫助:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.