A while back I had nix installed but I have removed it, however now when I try to install threadscope I get the follwowing error:
Henriks-MBP:trial henke$ brew install homebrew/gui/Threadscope
==> Installing threadscope from homebrew/gui
==> Installing dependencies for homebrew/gui/threadscope: libpng, freetype, fontconfig, pixman, gettext, libffi, glib, cairo, ghc, jpeg, libtiff, gobject-introspection, gdk-p
==> Installing homebrew/gui/threadscope dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.21.el_capitan.bottle.tar.gz
curl: (77) SSL: can't load CA certificate file /Users/henke/.nix-profile/etc/ssl/certs/ca-bundle.crt
Error: Failed to download resource "libpng"
Download failed: https://homebrew.bintray.com/bottles/libpng-1.6.21.el_capitan.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.21.tar.xz
curl: (19) Given file does not exist
Trying a mirror...
==> Downloading https://dl.bintray.com/homebrew/mirror/libpng-1.6.21.tar.xz
curl: (77) SSL: can't load CA certificate file /Users/henke/.nix-profile/etc/ssl/certs/ca-bundle.crt
Error: Failed to download resource "libpng"
Download failed: https://dl.bintray.com/homebrew/mirror/libpng-1.6.21.tar.xz
Now why is homebrew trying to find things in .nix-profile
and what can I do to install threadscopes dependencies?
This isn't homebrew specifically looking into the .nix-profile
directory. This is a fragment of having nix
installed.
When you installed nix
, it installed its own CA certs. Check the value of SSL_CERT_FILE
. in my case:
$ echo $SSL_CERT_FILE
/Users/my-user/.nix-profile/etc/ssl/certs/ca-bundle.crt
I have have had issues with this cert when attempting to use curl
with https
, which is what homebrew is doing.
I'm assuming you just recently removed nix
and still have that variable set in your shell. If you just close any currently open shells and open brand new ones, this should be fixed.
You could also try unset SSL_CERT_FILE
in any open shells instead of closing / opening them all.