在Debian上安装Rust工具链,推荐使用rustup工具,具体步骤如下:
sudo apt update
。sudo apt install -y build-essential curl git
。curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
,按提示操作,可选择安装稳定版等。source $HOME/.cargo/env
,也可将其添加到~/.bashrc
等文件中,以便每次打开终端自动配置。rustc --version
和cargo --version
,若显示版本号,则安装成功。