【问题标题】:homebrew openssl + rvm broken自制openssl + rvm坏了
【发布时间】:2018-09-27 14:04:18
【问题描述】:

不知何故,我的 RVM 无法安装 gems,因为我的 openssl 停止工作。我通过 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 + 系统证书,而第二台机器不检查?我该如何解决这个难题?

【问题讨论】:

    标签: openssl homebrew rvm


    【解决方案1】:

    我能够安装 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
    

    在此之后我能够安装,尽管 /System/openssl 的链接仍然显示在 rvm osx-ssl-certs status all 中。

    MacOS Mojave 一定改变了这台机器上的某些东西。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-26
      • 1970-01-01
      • 2013-03-08
      • 1970-01-01
      • 2014-02-25
      • 1970-01-01
      相关资源
      最近更新 更多