Skip to content

Instantly share code, notes, and snippets.

@sharl
Last active March 27, 2019 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharl/3a5540c792eb9524b1c86100c0263058 to your computer and use it in GitHub Desktop.
Save sharl/3a5540c792eb9524b1c86100c0263058 to your computer and use it in GitHub Desktop.
opensslアップデート時のcacert取得に失敗するときの対処方法

opensslアップデート時のcacert取得に失敗するときの対処方法

毎回忘れるのでメモ。

TL;DR

$ wget https://curl.haxx.se/ca/cacert.pem -O /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem

失敗する流れ

opensslアップデート時のpostinstallで

$ brew postinstall openssl
==> Postinstalling openssl
==> Downloading https://curl.haxx.se/ca/cacert-2019-01-23.pem
-=O=-                                  #      #    #     #                    
curl: (28) Resolving timed out after 5000 milliseconds
Trying a mirror...
==> Downloading http://linuxbrew.bintray.com/bottles/cacert-2019-01-23.pem
-=O=-                                  #      #    #     #                    
curl: (28) Resolving timed out after 5000 milliseconds
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall openssl`

(rm_fしてるので)最新のCACERT取得に失敗すると、その後のHTTPSアクセスが失敗するようになってしまう。

$ brew up
fatal: unable to access 'https://github.com/Homebrew/brew/': error setting certificate verify locations:
  CAfile: /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem
  CApath: /home/linuxbrew/.linuxbrew/etc/openssl/certs
fatal: unable to access 'https://github.com/Homebrew/linuxbrew-core.git/': error setting certificate verify locations:
  CAfile: /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem
  CApath: /home/linuxbrew/.linuxbrew/etc/openssl/certs
Error: Fetching /home/linuxbrew/.linuxbrew/Homebrew failed!
Fetching /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core failed!

こんな感じ。

そのため、別の手段で/home/linuxbrew/.linuxbrew/etc/openssl/cert.pemを更新。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment