首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Linuxbrew证书颁发

Linuxbrew证书颁发
EN

Stack Overflow用户
提问于 2019-08-23 15:15:12
回答 1查看 3.7K关注 0票数 8

我在服务器上安装了利努克。但是,当我尝试运行任何命令时,会遇到curl ( brew用于获取其更新)的问题。通常,当像这样的其他工具出现这种问题时,它们会提供一个标志来使证书的检查无效,而curl本身也提供了使用-k标志的可能性。

然而,在brew的文档中,我没有找到这样的标志。因此,我的第二个猜测是将放置在我家里的.curlrc文件中的标志.curlrcn设置为默认设置,即curl不检查SSL证书。

下面是我运行bew时输出的一个示例:

代码语言:javascript
运行
复制
-bash-4.1$ brew update
==> Installing dependencies for curl: patchelf, zlib, binutils, linux-headers, glibc, m4, gmp, mpfr, libmpc, isl@0.18, gcc, pkg-config and openssl
==> Installing curl dependency: patchelf
==> Downloading https://linuxbrew.bintray.com/bottles/patchelf-0.10.x86_64_linux.bottle.tar.gz

curl: (60) Peer certificate cannot be authenticated with known CA certificates
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
Error: Failed to download resource "patchelf"
Download failed: https://linuxbrew.bintray.com/bottles/patchelf-0.10.x86_64_linux.bottle.tar.gz
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-08-26 09:22:28

为了让Homebrew接受.curlrc文件中指定的选项,需要设置一个标志。

根据文件:

如果设置为HOMEBREW_CURLRC:,则在调用curl(1)时,Homebrew将不会传递-q,这将禁用curlrc的使用。

因此,只需运行此脚本就可以让自制软件忽略SSL证书验证:

代码语言:javascript
运行
复制
echo insecure >> ~/.curlrc
HOMEBREW_CURLRC=1
export HOMEBREW_CURLRC
brew install …
票数 14
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57629010

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档