gpt4 book ai didi

macos - 为什么curl(由 Homebrew 程序启动)在.nix-profile中查找?

转载 作者:行者123 更新时间:2023-12-01 14:38:05 26 4
gpt4 key购买 nike

不久前我安装了 nix,但我已将其删除,但是现在当我尝试安装 threadscope 时,出现以下错误:

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

现在为什么 homebrew 试图在 .nix-profile 中查找内容以及我该如何安装 threadscopes 依赖项?

最佳答案

这不是专门研究 .nix-profile 目录的 Homebrew 程序。这是安装 nix 的片段。

当您安装 nix 时,它安装了自己的 CA 证书。检查SSL_CERT_FILE 的值。就我而言:

$ echo $SSL_CERT_FILE
/Users/my-user/.nix-profile/etc/ssl/certs/ca-bundle.crt

在尝试将 curlhttps 一起使用时,我遇到了此证书的问题,这就是 homebrew 正在做的事情。

我假设您最近刚刚删除了 nix 并且仍然在 shell 中设置了该变量。如果您只是关闭所有当前打开的 shell 并打开全新的 shell,则应该修复此问题。

您还可以尝试在任何打开的 shell 中取消设置 SSL_CERT_FILE,而不是全部关闭/打开它们。

关于macos - 为什么curl(由 Homebrew 程序启动)在.nix-profile中查找?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37686455/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com