【发布时间】:2021-05-27 18:55:33
【问题描述】:
我想将我的 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
我试图用sudo apt remove rustc 删除rustc,但它返回了
Package 'rustc' is not installed, so not removed
虽然我可以从终端访问rustc。我当前的rustc 和cargo 版本是1.47.0。
【问题讨论】:
-
如果您使用
apt install安装它,那么问题是它没有被称为rustc它被称为其他东西。您需要在您的包裹中搜索包含“锈”字样的东西。还有apt remove那个。 -
apt list | grep rust应该只列出包含单词 rust 的已安装包。 -
apt list | grep rust显示,rust-doc,rust-gdb,rust-lldb,rust-src,rustc -
我想
apt list --installed rust没有显示任何包。这意味着 rust-doc、rust-gdb、rust-lldb、rust-src、rustc... 已安装但不是通过 apt 安装的,因此无法删除它们。 -
你还记得你是如何安装 rustc 的吗?
标签: ubuntu rust ubuntu-18.04 uninstallation rust-cargo