Troubleshooting installation problems
first-install fails
error: Rust 1.48.0 does not match extension requirement >=1.56.0
Reason
I believe it was related to cryptography and a minimum required rust version
Solution
Building cryptography requires having a working Rust toolchain. The current minimum supported Rust version is 1.48.0. This is newer than the Rust some package managers ship , so users may need to install with the instructions below.
(homeassistant20230201) homeassistant20230201@raspberrypi:/srv/homeassistant20230201 $ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
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
warning: or pass `-y' to ignore all ignorable checks.
error: cannot install while Rust is installed
uninstall your existing Rust
sudo apt remove rustc
output
root@raspberrypi:~# sudo apt remove rustc
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
libgit2-1.1 libhttp-parser2.9 libmbedcrypto3 libmbedtls12 libmbedx509-0 libstd-rust-1.48 libstd-rust-dev rust-gdb
使用'sudo apt autoremove'来卸载它(它们)。
下列软件包将被【卸载】:
cargo rustc
升级了 0 个软件包,新安装了 0 个软件包,要卸载 2 个软件包,有 11 个软件包未被升级。
解压缩后将会空出 13.6 MB 的空间。
您希望继续执行吗? [Y/n] y
(正在读取数据库 ... 系统当前共安装有 174104 个文件和目录。)
正在卸载 cargo (0.47.0-3) ...
正在卸载 rustc (1.48.0+dfsg1-1+rpi1) ...
正在处理用于 man-db (2.9.4-2) 的触发器 ...
re-install with
curl https://sh.rustup.rs -sSf | sh
output
(homeassistant20230201) homeassistant20230201@raspberrypi:/srv/homeassistant20230201 $ 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 its package manager, Cargo.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
/home/homeassistant20230201/.rustup
This can be modified with the RUSTUP_HOME environment variable.
The Cargo home directory is located at:
/home/homeassistant20230201/.cargo
This can be modified with the CARGO_HOME environment variable.
The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:
/home/homeassistant20230201/.cargo/bin
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/home/homeassistant20230201/.profile
/home/homeassistant20230201/.bashrc
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: armv7-unknown-linux-gnueabihf
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1
info: profile set to 'default'
info: default host triple is armv7-unknown-linux-gnueabihf
warning: Updating existing toolchain, profile choice will be ignored
info: syncing channel updates for 'stable-armv7-unknown-linux-gnueabihf'
info: default toolchain set to 'stable-armv7-unknown-linux-gnueabihf'
stable-armv7-unknown-linux-gnueabihf unchanged - rustc 1.67.0 (fc594f156 2023-01-24)
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).
To configure your current shell, run:
source "$HOME/.cargo/env"
restart your current shell
sudo -u homeassistant20230201 -H -s
cd /srv/homeassistant20230201
source bin/activate
useful links
Error: Failed building wheel for cryptography