自制 openssl + rvm 损坏

homebrew openssl + rvm broken

由于我的 openssl 停止工作,我的 RVM 无法安装 gems。我通过 brew 安装了 openssl 和 openssl@1.1。更新到 macOS 10.14 后,我无法安装 gems。当我尝试时,我得到:

$ gem install rdoc-data -v 3.12
ERROR:  Could not find a valid gem 'rdoc-data' (= 3.12), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version (https://rubygems.org/specs.4.8.gz)

当我检查 RVM ssl-certs 时,我得到:

1st machine $ rvm osx-ssl-certs status all
Warning! PATH is not properly set up, /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-head/bin is not at first place.
         Usually this is caused by shell initialization files. Search for PATH=... entries.
         You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
         To fix it temporarily in this shell session run: rvm use ruby-1.8.7-head
         To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
Selected SSL certs for: ruby-2.3.4
cURL certificate bundle /usr/share/curl/curl-ca-bundle.crt not found
Certificates bundle /usr/local/etc/openssl/cert.pem is up to date.
Certificates bundle /etc/openssl/cert.pem is up to date.
Certificates bundle /System/Library/OpenSSL/cert.pem is old.
Certificates bundle  is old.
Certificates bundle /usr/local/etc/openssl@1.1/cert.pem is up to date.

1st machine $ rvm osx-ssl-certs update all
.
.
cURL certificate bundle /usr/share/curl/curl-ca-bundle.crt not found
Updating certificates bundle /usr/local/etc/openssl/cert.pem: Already up to date.
Updating certificates bundle /etc/openssl/cert.pem: Already up to date.
Updating certificates bundle /System/Library/OpenSSL/cert.pem: Updating certificates bundle '/System/Library/OpenSSL/cert.pem'
MYACCOUNT password required for 'command tee /System/Library/OpenSSL/cert.pem': 
tee: /System/Library/OpenSSL/cert.pem: Operation not permitted
Failed.
Updating certificates bundle /System/Library/OpenSSL/cert.pem: Updating certificates bundle '/System/Library/OpenSSL/cert.pem'
tee: /System/Library/OpenSSL/cert.pem: Operation not permitted
Failed.
Updating certificates bundle /usr/local/etc/openssl@1.1/cert.pem: Already up to date.

在我的其他机器中 brew/openssl 仅依赖于 /usr/local/etc/openssl/ 中的自己的证书,而不依赖于 /System/Library.OpenSSL 证书;

2nd machine $ rvm osx-ssl-certs status all
.
.
Selected SSL certs for: ruby-1.8.7-head
cURL certificate bundle /usr/share/curl/curl-ca-bundle.crt not found
Certificates bundle /usr/local/etc/openssl/cert.pem is up to date.

为什么第一台机器检查 brew + 系统证书而第二台机器不检查?我该如何解决这个难题?

我能够安装 gems。我不得不重新编译所有红宝石:

$ ram uninstall ruby-1.8.7-p374
$ rvm install ruby-1.8.7-p374 --with-gcc=clang
$ rvm use ruby-1.8.7-p374@openssl-test01 --create
$ gem install rdoc-data -v 3.12

在此之后我能够安装,尽管 link 到 /System/openssl 仍然显示在 rvm osx-ssl-certs status all.

MacOS Mojave 一定在这台机器上做了一些改变。