docker - Rust 安装失败。命令 'rustup-init -y' 抛出错误。
问题描述
我在公司代理后面,我正在尝试在 Ubuntu 机器上安装 Hyperledger Sawtooth。
该设置的一部分是安装失败的 rust。
它使用以下命令,该命令取自“Dockerfile”文件作为命令的一部分docker-compose up
:
curl --insecure https://sh.rustup.rs -sSf > /usr/bin/rustup-init && chmod +x /usr/bin/rustup-init && rustup-init -y
这给了我一个错误:
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
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.
rustup: command failed: downloader https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init /tmp/tmp.KEMZg5vZRK/rustup-init
显然,该命令rustup-init -y
失败,因为我在公司代理后面,并且无法连接 URL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init。
我在哪里进行修改(添加 -k 标志)以关闭 curl 的证书验证选项,以便我获得不安全的连接并且我的安装成功?
我尝试修改 rustup-init.sh 文件,但没有用。
解决方案
推荐阅读
- html - 如何将文本框值嵌入 HTML 中的 href
- arrays - 在 SAS 中编写公式
- html - 以百分比表示的 Img 标签大小
- keycloak - 在身份验证中创建具有另一个值的 cookie ( Keycloak )
- python-3.x - Python。它不是从 Stack 对象打印实际值,而是返回该对象的地址
- reactjs - 如何以 Object 形式返回从 Axios 接收到的数据
- javascript - 如何使用 yup 在反应钩子中不允许特殊字符和空格
- r - R按事件序列过滤
- jquery - 每个多步骤表单卡的多个 DIV 不起作用
- javascript - 如何将 'xxth Mar XXXX' 格式的日期转换为 'DD/MM/YY' 格式?