Невозможно установить драгоценные камни с https: //rubygems.org/ после обновления MacOS Mojave SSL / TLS (?)

В настоящее время я не могу установить драгоценные камни из "https://rubygems.org/", который я недавно обновил до Mojave и обновил и обновил brew, чтобы снова запустить mysql. Теперь я обнаружил, что не могу устанавливать драгоценные камни из rubygems.

При попытке установить гем

[REPRO]$ 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://api.rubygems.org/specs.4.8.gz)

Я уже пробовал это, но это не сработало.

Пытаюсь обновить RVM

[REPRO]$ rvm get stable
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /Users/MYACCOUNT/.rvm/archives/rvm-installer.asc
gpg: Signatur vom Sat Mar 31 23:47:44 2018 CEST
...
GPG verified '/Users/MYACCOUNT/.rvm/archives/rvm-1.29.4.tgz'
Upgrading the RVM installation in /Users/MYACCOUNT/.rvm/
RVM PATH line found in /Users/MYACCOUNT/.mkshrc /Users/MYACCOUNT/.profile /Users/MYACCOUNT/.zshrc.
RVM PATH line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.
RVM sourcing line found in /Users/MYACCOUNT/.profile /Users/MYACCOUNT/.bash_profile /Users/MYACCOUNT/.zlogin.
Upgrade of RVM in /Users/MYACCOUNT/.rvm/ is complete.
  * RVM 1.30 simplifies behavior of 'rvm wrapper' subcommand


RVM reloaded!

Попытка обновить CERT

[REPRO]$ rvm osx-ssl-certs update all
Selected SSL certs for: ruby-2.3.4
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: Updating certificates bundle '/etc/openssl/cert.pem'
MYACCOUNT password required for 'command tee /etc/openssl/cert.pem': 
Updated.
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 /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/[email protected]/cert.pem: Already up to date.

Пытаюсь обновить RVM

[REPRO]$ rvm rubygems latest
Installed rubygems 2.6.8 is newer than 2.0.17 provided with installed ruby, skipping installation, use --force to force installation.

Пытаюсь установить драгоценный камень

[REPRO]$ 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://api.rubygems.org/specs.4.8.gz)

У меня установлено два openssl через brew:

[REPRO]$ brew info openssl
openssl: stable 1.0.2p (bottled) [keg-only]
SSL/TLS cryptography library
https://openssl.org/
/usr/local/Cellar/openssl/1.0.2o_1 (1,791 files, 12.3MB)
  Poured from bottle on 2018-04-17 at 00:25:36
/usr/local/Cellar/openssl/1.0.2o_2 (1,792 files, 12.3MB)
  Poured from bottle on 2018-06-22 at 06:37:09
/usr/local/Cellar/openssl/1.0.2p (1,793 files, 12MB)
  Poured from bottle on 2018-09-25 at 07:30:55
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl.rb
==> Dependencies
Build: makedepend ✘
==> Options
--without-test
    Skip build-time tests (not recommended)
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find openssl you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl/include"

For pkg-config to find openssl you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

==> Analytics
install: 556,733 (30d), 1,491,119 (90d), 4,803,757 (365d)
install_on_request: 75,928 (30d), 212,774 (90d), 546,010 (365d)
build_error: 14,735 (30d)

а также

[REPRO]$ brew info [email protected]
[email protected]: stable 1.1.1 (bottled) [keg-only]
Cryptography and SSL/TLS Toolkit
https://openssl.org/
/usr/local/Cellar/[email protected]/1.1.0h (6,587 files, 15.6MB)
  Poured from bottle on 2018-04-17 at 00:24:57
/usr/local/Cellar/[email protected]/1.1.1 (7,821 files, 17.9MB)
  Poured from bottle on 2018-09-25 at 07:31:15
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/[email protected]
==> Options
--without-test
Skip build-time tests (not recommended)
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/[email protected]/certs

and run
  /usr/local/opt/[email protected]/bin/c_rehash

[email protected] is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile

For compilers to find [email protected] you may need to set:
  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

For pkg-config to find [email protected] you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"

==> Analytics
install: 0 (30d), 0 (90d), 0 (365d)
install_on_request: 0 (30d), 0 (90d), 0 (365d)
build_error: 13 (30d)

У меня есть 'PATH = "/ usr / local / opt / openssl / bin: $ PATH"' в моем ~ / .bash_profile

Раньше все работало до обновления системы, но теперь моя система разработки сломана. Кто-нибудь может помочь? Я могу указать http; // rubygems.org в файле gem и, следовательно, установить драгоценные камни через установку пакета, но это не решение.

Обновлять:

Узнал еще кое-что: на второй машине все работает как положено. В обеих системах RVM полагается на openssl, который в обоих случаях является brew / openssl или brew/[email protected]. На первой машине получаю:

$ rvm osx-ssl-certs status all
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 /usr/local/etc/[email protected]/cert.pem is up to date.

на второй я получаю:

$ 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.

Почему первая машина также проверяет / System / Library /? Как я могу настроить его так, чтобы это не происходило?


person SEJU    schedule 26.09.2018    source источник
comment
Можете ли вы запустить rvm --trace osx-ssl-certs update all и публиковать материалы?   -  person D1ceWard    schedule 26.09.2018
comment
Спасибо за ваш ответ. Я попробовал и получил 7000 строк кода. Какая его часть вам нужна?   -  person SEJU    schedule 26.09.2018
comment
Похоже, что сервер rubygems.org не работает!   -  person SEJU    schedule 26.09.2018
comment
Если вы можете опубликовать всю трассировку или, может быть, на стороннем веб-сайте, например pastebin, потому что трудно сказать, какая часть мне нужна, но обычно это в конце. (Rubygems, кажется, тяжело переживает да)   -  person D1ceWard    schedule 26.09.2018
comment
Мне пришлось создать 2 файла: pastebin.com/u/SEJU/ 1/0/1 /? Guest = 1   -  person SEJU    schedule 26.09.2018
comment
uptime.rubygems.org   -  person Pavel Mikhailyuk    schedule 26.09.2018
comment
Хорошо, похоже, что rvm (как root) не может записать новый сертификат в /System/Library/OpenSSL/, как показано в этой ошибке tee: /System/Library/OpenSSL/cert.pem: Operation not permitted, я думаю, что это результат защиты целостности системы macOS, возможно, попробуйте отключить ее (только для сертификата обновления rvm), как описано здесь stackoverflow.com/questions/32659348/ Если это сработает, вам следует открыть проблему на rvm github.   -  person D1ceWard    schedule 26.09.2018
comment
@PavelMikhailyuk благодарит Павла! Когда я час назад проверял, rubygems.org все показывал онлайн ... возможно, эта часть тоже не работала ....   -  person SEJU    schedule 26.09.2018
comment
Я обновил вторую машину до Mojave, и теперь я могу установить ее с rubygems. Как я могу устранить неполадки на первой машине?   -  person SEJU    schedule 27.09.2018


Ответы (1)


Я смог установить драгоценные камни. Пришлось перекомпилировать все рубины:

$ 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.

person SEJU    schedule 28.09.2018