首页 > 解决方案 > 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 文件,但没有用。

标签: dockerrusthyperledger-sawtoothrustup

解决方案


推荐阅读