在Debian上更新Rust工具鏈,可按以下步驟操作:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
,按提示完成安裝;若已安裝,直接運行rustup update
更新rustup本身。rustup update
可更新所有已安裝的Rust工具鏈到最新版本;若只想更新特定版本,如穩定版、beta版或nightly版,可分別使用rustup update stable
、rustup update beta
、rustup update nightly
命令。rustc
或cargo
,可使用rustup component update <component-name>
命令,將<component-name>
替換為相應組件名稱。rustc --version
和cargo --version
命令查看版本,確認更新成功。