Unable to install on raspberry pi due to env_logger error
Closed this issue · 7 comments
Look for similar bugs
There does not seem to be any similar issues.
Description
On a raspberry pi 3 A+, debian bookworm, trying to install with cargo install librespot
fails with the following
Updating crates.io index
Installing librespot v0.6.0
error: failed to compile `librespot v0.6.0`, intermediate artifacts can be found at `/tmp/cargo-installCWlTBr`
Caused by:
failed to select a version for `env_logger`.
... required by package `librespot v0.6.0`
versions that meet the requirements `^0.11.2` are: 0.11.5, 0.11.4, 0.11.3, 0.11.2
the package `librespot` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
failed to select a version for `env_logger` which could resolve this conflict
Version
v0.5.0
and v0.6.0
. v0.4.2
fails for other reasons
How to reproduce
cargo install librespot
Log
Updating crates.io index
Installing librespot v0.6.0
error: failed to compile `librespot v0.6.0`, intermediate artifacts can be found at `/tmp/cargo-installCWlTBr`
Caused by:
failed to select a version for `env_logger`.
... required by package `librespot v0.6.0`
versions that meet the requirements `^0.11.2` are: 0.11.5, 0.11.4, 0.11.3, 0.11.2
the package `librespot` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
failed to select a version for `env_logger` which could resolve this conflict
Host (what you are running librespot
on):
- OS: Debian Bookworm
- Platform: RPI 3A+
What version of Cargo? An old one?
Hi @kingosticks sorry for the delay here.
TLDR; the rpi was on cargo@v1.65.0
which I believe is old? I'll report back once I've managed to install a later version and tried to install librespot
I installed it with the Cargo I got from running apt install cargo
which was v1.65.0
. I was trying to figure out what the latest version was by installing rust/cargo
via rustup
but apparently this is too much for the rpi (it's still running the install...). I'm assuming though that installing rust
on another machine will give ~ the same version of cargo
though, so on my main machine it seems like that's v1.83.0
.
Not pi 3+ but I've used this for rasberry pi1
https://gist.github.com/aldemira/2e3753301a954ad4d88a053a1dc85699
Can't remember on top of my head whether pi3 is 32bit or not, if not omit the armel stuff. I've also used that gist without armel to compile for zero 2w.
Also ignore that it writes spotifyd there. That's what I used that for until I settled for librespot.
Not pi 3+ but I've used this for rasberry pi1
https://gist.github.com/aldemira/2e3753301a954ad4d88a053a1dc85699
Can't remember on top of my head whether pi3 is 32bit or not, if not omit the armel stuff. I've also used that gist without armel to compile for zero 2w.
Also ignore that it writes spotifyd there. That's what I used that for until I settled for librespot.
Fyi You may want to update the librespot features on the last line.
Unfortunately it seems like I'm unable to properly install rust on this system, whenever I try to run a command like cargo install librespot
it gets stuck printing
info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu'
info: latest update on 2024-11-28, rust version 1.83.0 (90b35a623 2024-11-26)
and then fails with error: Missing manifest in toolchain 'stable-aarch64-unknown-linux-gnu'
.
Based on this discussion it seems like the rpi might just be too memory constrained for rust (it only has 416M RAM) and increasing swap doesn't seem to help.
Thanks for your help all!
You can either cross compile on a less crippled machine, or let someone else do that for you: https://github.com/dtcooper/raspotify
I didn't even think of that 🤦 I appreciate you!