毎回忘れるのでメモ。
$ 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
を更新。