いつの頃からか
$ brew update fatal: unable to access 'https://github.com/brewsci/homebrew-bio/': 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/Linuxbrew/homebrew-core/': 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/Linuxbrew/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/brewsci/homebrew-science/': 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/Linuxbrew/homebrew-extra/': 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/Linuxbrew/homebrew-xorg/': 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/Library/Taps/brewsci/homebrew-bio failed! Fetching /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core failed! Fetching /home/linuxbrew/.linuxbrew/Homebrew failed! Fetching /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/brewsci/homebrew-science failed! Fetching /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/linuxbrew/homebrew-extra failed! Fetching /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/linuxbrew/homebrew-xorg failed!
というようなエラーが出るようになった。brewで入れたアプリの挙動も若干おかしいような感じもあった。
$ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /opt/rbenv/shims/passenger-config Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: xproto kbproto renderproto xextproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated kbproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated renderproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xextproto Warning: Some installed formulae are missing dependencies. You should `brew install` the missing dependencies: brew install nghttp2 Run `brew missing` for more details. $ brew missing httpd: nghttp2 Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated kbproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated renderproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xextproto Warning: Use linuxbrew/xorg/xorgproto instead of deprecated xproto
てな感じでいまいちピンとこない。
Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
brew install nghttp2
といっているのでやってみても
$ brew install nghttp2 ==> Downloading https://linuxbrew.bintray.com/bottles/nghttp2-1.35.0_1.x86_64_linux.b #=#=# curl: (77) error setting certificate verify locations: CAfile: /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem CApath: /home/linuxbrew/.linuxbrew/etc/openssl/certs Error: Failed to download resource "nghttp2" Download failed: https://linuxbrew.bintray.com/bottles/nghttp2-1.35.0_1.x86_64_linux.bottle.tar.gz Warning: Bottle installation failed: building from source. ==> Installing dependencies for nghttp2: cunit and sphinx-doc ==> Installing nghttp2 dependency: cunit ==> Downloading https://linuxbrew.bintray.com/bottles/cunit-2.1-3.x86_64_linux.bottle #=#=# curl: (77) error setting certificate verify locations: CAfile: /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem CApath: /home/linuxbrew/.linuxbrew/etc/openssl/certs Error: Failed to download resource "cunit" Download failed: https://linuxbrew.bintray.com/bottles/cunit-2.1-3.x86_64_linux.bottle.tar.gz Warning: Bottle installation failed: building from source. ==> Downloading https://downloads.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1 ==> Downloading from https://jaist.dl.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit curl: (77) error setting certificate verify locations: CAfile: /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem CApath: /home/linuxbrew/.linuxbrew/etc/openssl/certs Error: An exception occurred within a child process: DownloadError: Failed to download resource "cunit" Download failed: https://downloads.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2
というふうにエラーが出てどうにもならない。
curl: (77) error setting certificate verify locations:
CAfile: /home/linuxbrew/.linuxbrew/etc/openssl/cert.pem
CApath: /home/linuxbrew/.linuxbrew/etc/openssl/certs
この部分をキーワードにGoogle先生に聞いてみることに
ここの議論が役に立ちそう。
https://github.com/Linuxbrew/brew/wiki/FAQ#why-does-curl-fail
この内容を実行してみる。
$ echo insecure >> ~/.curlrc $ git config --global http.sslVerify false $ HOMEBREW_CURLRC=1 brew reinstall openssl curl ==> Reinstalling openssl /home/linuxbrew/.linuxbrew/opt/curl/bin/curl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory /home/linuxbrew/.linuxbrew/opt/curl/bin/curl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory ==> Downloading https://linuxbrew.bintray.com/bottles/openssl-1.0.2q.x86_64_linux.bot Already downloaded: /home/kkuro/.cache/Homebrew/downloads/1f3e1701e705004ce4d20bb716c43b12fb78b3858387a0cce9e38e48e455764a--openssl-1.0.2q.x86_64_linux.bottle.tar.gz ==> Pouring openssl-1.0.2q.x86_64_linux.bottle.tar.gz ==> Downloading https://curl.haxx.se/ca/cacert-2017-01-18.pem ######################################################################## 100.0% ==> 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 /home/linuxbrew/.linuxbrew/etc/openssl/certs and run /home/linuxbrew/.linuxbrew/opt/openssl/bin/c_rehash ==> Summary 🍺 /home/linuxbrew/.linuxbrew/Cellar/openssl/1.0.2q: 1,801 files, 14.4MB ==> Reinstalling curl /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:63:in `exec': No such file or directory - /home/linuxbrew/.linuxbrew/opt/curl/bin/curl (Errno::ENOENT) from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:63:in `block in report' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:62:in `fork' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:62:in `report' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:73:in `report_event' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:282:in `install' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/reinstall.rb:33:in `reinstall_formula' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/reinstall.rb:51:in `block in reinstall' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/reinstall.rb:45:in `each' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/reinstall.rb:45:in `reinstall' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:89:in `<main>' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:63:in `exec': No such file or directory - /home/linuxbrew/.linuxbrew/opt/curl/bin/curl (Errno::ENOENT) from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:63:in `block in report' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:62:in `fork' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:62:in `report' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/analytics.rb:73:in `report_event' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:285:in `install' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/reinstall.rb:33:in `reinstall_formula' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/reinstall.rb:51:in `block in reinstall' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/reinstall.rb:45:in `each' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/reinstall.rb:45:in `reinstall' from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:89:in `<main>' ==> Downloading https://linuxbrew.bintray.com/bottles/curl-7.62.0.x86_64_linux.bottle Already downloaded: /home/kkuro/.cache/Homebrew/downloads/eae2bbb46c08f04eecf0c3364737c73eb85e8ec332c63d62c043432e265cda63--curl-7.62.0.x86_64_linux.bottle.tar.gz ==> Pouring curl-7.62.0.x86_64_linux.bottle.tar.gz 🍺 /home/linuxbrew/.linuxbrew/Cellar/curl/7.62.0: 445 files, 3.6MB ==> Caveats ==> openssl 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 /home/linuxbrew/.linuxbrew/etc/openssl/certs and run /home/linuxbrew/.linuxbrew/opt/openssl/bin/c_rehash
なんかイケたっぽい。
$ sed -i '/^insecure$/d' ~/.curlrc $ git config --global http.sslVerify true $ brew update Updated 2 taps (homebrew/core and brewsci/bio). ==> New Formulae dav1d interactive-rebase-tool rargs dnscontrol opa sng gambit-scheme php@7.2 up goreman pict websocat i386-elf-gdb postgresql@10 ==> Updated Formulae curl ✔ gnupg osrm-backend eigen ✔ gnuradio packer freetds ✔ go paket git ✔ go-bindata pandoc-citeproc icu4c ✔ go@1.10 pandoc-crossref jansson ✔ gobject-introspection parallelstl libpng ✔ gocryptfs passenger openssl ✔ godep pazpar2 pixman ✔ goenv pdftoedn sqlite ✔ golang-migrate pdftoipe tbb ✔ goreleaser percona-server abyss gphoto2 percona-server@5.6 activemq gpsbabel petsc aircrack-ng gradle petsc-complex akamai grafana pgroonga alexjs grails pgrouting allure graph-tool pgweb amazon-ecs-cli grpc phoronix-test-suite ammonite-repl gst-plugins-ugly php amqp-cpp gstreamermm php@5.6 angle-grinder gtk+3 php@7.1 angular-cli gtkmm3 phpmyadmin ansible gupnp-tools phpunit ansifilter haproxy picard-tools apache-arrow-glib harfbuzz pig apache-flink haskell-stack pijul apache-geode healpix planck aptly helmfile platformio arangodb hfstospell plplot arcade-learning-environment highlight pmd asdf hub pngquant astrometry-net hugo poppler aubio hyperfine postgis aws-sdk-cpp ibex postgresql awscli icemon ppsspp awslogs ike-scan pqiv azure-cli imagemagick presto b2-tools immortal prettier babel influxdb protobuf ballerina ipython pulumi basex jboss-forge pumba bazel jena pyenv bcal jenkins pygobject3 beagle jenkins-lts qalculate-gtk bgpq3 jhipster qbs bigloo jsonnet qemu binaryen juju qmmp bind kafka qpid-proton bitrise kapacitor qt blink1 kibana quicktype brewsci/bio/bali-phy knot-resolver radare2 brewsci/bio/biobloomtools kobalt rakudo-star brewsci/bio/libsequence kotlin rancher-cli brewsci/bio/mlst kubeless re2 brewsci/bio/racon kubernetes-cli rebar3 brewsci/bio/tbl2asn kubernetes-helm redis bundletool kustomize riemann-client bzt lean-cli rke c-blosc leiningen rom-tools cabextract leptonica ruby-build caffe libassuan rust cake libatomic_ops rustup-init cargo-completion libav sbcl catimg libbi sbt ceres-solver libbladerf sbt@0.13 certbot libbtbb scala cfitsio libcdr scalapack cglm libdazzle sceptre chakra libedit scipy checkbashisms libextractor sdl2 checkstyle libfreehand shadowsocks-libev chronograf libgda shellcheck circleci libgpg-error shfmt citus libgphoto2 shibboleth-sp ckan libical sile clblast libjwt skaffold clojure liblcf skinny cmake libmspub skopeo cockroach libosmium smimesign composer libphonenumber snapcraft conan libplctag solr convox libpqxx sonobuoy couchdb libqalculate source-to-image cp2k librealsense spotbugs cppcheck libressl sqlcipher create-dmg librsvg sqldiff curl-openssl libswiften sqlite-analyzer cython libtins stellar-core dasht libuv stockfish dbhash libvirt stone-soup dbus libvisio stunnel dependency-check libvmaf sundials dialog libxmlsec1 swagger-codegen diff-pdf lighttpd swiftformat digdag lmod swiftlint dita-ot logstash syncthing django-completion logtalk sysbench dmd lolcat tarantool dnscrypt-wrapper lxc taskell docfx macvim tectonic docker makensis telegraf docker-compose mame temporal_tables docker-compose-completion mapnik terraform docker-machine-nfs mapserver terraform_landscape doctl maxwell thefuck dub media-info theharvester duo_unix mercurial tile38 dwdiff mesa tippecanoe dwm meson tmuxinator-completion easyengine mimic tomcat elasticsearch minica tomcat-native elasticsearch@5.6 minio tomcat@7 embulk minio-mc tomcat@8 envconsul mint tomee-webprofile eprover mkl-dnn topgrade erlang mkvtoolnix tox erlang@20 mmseqs2 traefik eslint mongodb@3.4 twoping ethereum mongodb@3.6 typescript exploitdb mosquitto ubertooth faas-cli mpc ucloud fauna-shell mpd urh fdk-aac mruby v8 fdk-aac-encoder mutt vagrant-completion ffmpeg mycli vert.x ffmpeg2theora nativefier vim ffmpeg@2.8 neo4j vips ffmpegthumbnailer nettle vsts-cli ffms2 nghttp2 vte3 firebase-cli nmh weaver fluent-bit nng webpack flume node wget flyway node-build widelands fn node@10 wine fonttools node@8 winetricks fping nss wireshark freeciv numpy wolfssl freeling nuxeo wp-cli frugal nwchem wtf fswatch octave wxmaxima fwup ompl x264 fx oniguruma xcodegen gcab opam xmake gcc@7 open-mpi xml-security-c gdb openapi-generator xml-tooling-c geos openblas xsimd git-archive-all opencoarrays xtensor git-lfs opencv yaz git-quick-stats opencv@2 you-get git-standup openfortivpn youtube-dl github-markdown-toc openimageio zebra gitlab-runner openmsx zim gjs openrct2 znc gmsh osm2pgrouting zola gnome-latex osmium-tool zorba ==> Renamed Formulae hh -> hstr ==> Deleted Formulae aptly-completion gradle@2.14 pldebugger ffmbc php@7.0
治った。これでようやく
$ brew upgrade