Rust error: Unable to update registry `crates-io`
报错信息
Updating crates.io index
error: Unable to update registry `crates-io`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
SSL error: received early EOF; class=Ssl (16); code=Eof (-20)
root@DESKTOP-HNHSVEO:~/kvstore# root@DESKTOP-HNHSVEO:~/kvstore# cargo run --example clapgui
pdating crates.io index
error: -bash: root@DESKTOP-HNHSVEO:~/kvstore#: No such file or directory
Unabroot@DESKTOP-HNHSVEO:~/kvstore# Updating crates.io index
le to update registry `crates-io`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
SSL error: received early EOF; class=Ssl (16); code=Eof (-20)Updating: command not found
查找资料后说要更新rustup,使用命令行 rustup update
又报错:
rustup: command not found
运行rustup -version
也报错:
rustup: command not found
解决方案
- 运行命令:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- 添加路径到系统路径:
运行命令:nano ~/.bashrc
打开文件在末行添加export PATH="$HOME/.cargo/bin:$PATH"
再运行source ~/.bashrc
验证
运行rustup --version
结果rustup 1.25.2 (17db695f1 2023-02-01)
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /boutique/detail/tanhgkjgck
系列文章
更多
同类精品
更多
-
photoshop保存的图片太大微信发不了怎么办
PHP中文网 06-15 -
《学习通》视频自动暂停处理方法
HelloWorld317 07-05 -
word里面弄一个表格后上面的标题会跑到下面怎么办
PHP中文网 06-20 -
Android 11 保存文件到外部存储,并分享文件
Luke 10-12 -
photoshop扩展功能面板显示灰色怎么办
PHP中文网 06-14 -
微信公众号没有声音提示怎么办
PHP中文网 03-31 -
excel下划线不显示怎么办
PHP中文网 06-23 -
excel打印预览压线压字怎么办
PHP中文网 06-22 -
TikTok加速器哪个好免费的TK加速器推荐
TK小达人 10-01 -
怎样阻止微信小程序自动打开
PHP中文网 06-13