我尝试使用推荐的安装脚本在 Raspberrypi 4 上安装 rust:
pi@raspberrypi:/tmp $ curl https://sh.rustup.rs -sSf | sh
Run Code Online (Sandbox Code Playgroud)
但重启后,cargo找不到:
pi@raspberrypi:~ $ cargo
error: command failed: 'cargo'
error: caused by: No such file or directory (os error 2)
Run Code Online (Sandbox Code Playgroud)
这可能与安装过程中报告的情况有关(error reading rustc version)(完整的安装日志位于底部):
info: default toolchain set to 'stable-aarch64-unknown-linux-gnu'
stable-aarch64-unknown-linux-gnu installed - (error reading rustc version)
Run Code Online (Sandbox Code Playgroud)
以下是完整的安装日志:
pi@raspberrypi:/tmp $ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and …Run Code Online (Sandbox Code Playgroud)