gpt4 book ai didi

ubuntu - 我们如何才能完全删除 Ubuntu 安装的 Rust?

转载 作者:行者123 更新时间:2023-12-04 18:25:34 29 4
gpt4 key购买 nike

我想将我的 Rust 更新到最新,但是当我搜索 rustup 时它没有出现在我的系统中rustup: command not found .我尝试使用 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 安装 rustup .它发出了这个警告。

warning: rustup should not be installed alongside Rust. Please uninstall your existing Rust first.
warning: Otherwise you may have confusion unless you are careful with your PATH
warning: If you are sure that you want both rustup and your already installed Rust
warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes
我试图删除 rustcsudo apt remove rustc但它返回
Package 'rustc' is not installed, so not removed
虽然我可以访问 rustc从终端。我的当前 rustccargo版本是 1.47.0。

最佳答案

你可以通过卸载 cargo 然后自动删除它现在不需要的依赖项来手动删除旧的 rust 二进制文件:

sudo apt remove cargo
sudo apt autoremove
完成后,您应该可以运行 rustup正常安装脚本:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
请记住,您可能需要在系统 PATH 之前重新启动 shell 或注销。将更新以包含新的二进制文件。

关于ubuntu - 我们如何才能完全删除 Ubuntu 安装的 Rust?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66368103/

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