# Install support for Spotify

**URL:** <https://discourse.mopidy.com/t/install-support-for-spotify/5902>\
**Category:** Help and support\
**Created:** [February 29, 2024, 4:25pm UTC](https://discourse.mopidy.com/t/install-support-for-spotify/5902 "2024-02-29T16:25:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![blossa69](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blossa69/32/2481_2.png) [@blossa69](https://discourse.mopidy.com/u/blossa69)\
**Post date:** [February 29, 2024, 4:25pm UTC](https://discourse.mopidy.com/t/install-support-for-spotify/5902/1 "2024-02-29T16:25:16Z")

</div>

Hi,

I am getting a bit confused when googling howto install support for Spotify to Mopidy.

Maybe I am doing wrong but as I understand from [GitHub - mopidy/mopidy-spotify: Mopidy extension for playing music from Spotify](https://github.com/mopidy/mopidy-spotify#dependencies) I should install run “cargo build --package gst-plugin-spotify --release” (or “cargo build --package gst-plugin-spotify --release -j1”).

When I run that it stops at following point:  
//  
Skipping git submodule `https://github.com/gtk-rs/gir` due to update strategy in .gitmodules  
Skipping git submodule `https://github.com/gtk-rs/gir-files` due to update strategy in .gitmodules  
Compiling librespot-protocol v0.4.2  
Compiling glib v0.20.0 ([GitHub - gtk-rs/gtk-rs-core: Rust bindings for GNOME libraries](https://github.com/gtk-rs/gtk-rs-core?branch=master#90fc2033))  
Compiling librespot-core v0.4.2  
Compiling librespot-metadata v0.4.2  
^C Building [======================\>] 277/289: librespot-core, glib, librespot-protocol, librespot-metadata  
blossa@server:~/gst-plugins-rs $  
//

I am very new to cargo and I do not know what kind of logs you might want.

Can someone point me into right direction for troubleshoot more? Any other tips?

Regards, Anders

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [February 29, 2024, 5:16pm UTC](https://discourse.mopidy.com/t/install-support-for-spotify/5902/2 "2024-02-29T17:16:52Z")

</div>

Your problem sounds exactly like [cargo build of gst-plugin-spotify stuck at 288/298 · Issue #372 · mopidy/mopidy-spotify · GitHub](https://github.com/mopidy/mopidy-spotify/issues/372)

If you are trying to compile on a slow/limited machine (like a pi) then yes, you need to limit the threads.

---

<div class="post-metadata">

**Author:** ![blossa69](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blossa69/32/2481_2.png) [@blossa69](https://discourse.mopidy.com/u/blossa69)\
**Post date:** [February 29, 2024, 9:10pm UTC](https://discourse.mopidy.com/t/install-support-for-spotify/5902/3 "2024-02-29T21:10:18Z")

</div>

I agree that it sounds exactly like that. Thanks! (I wonder why I did not find that post… 😃 )

## I have tried using the “… -j 1” flag. “–jobs 1” should be the same, but I will try. I have Pi3 and I run Bookworm on it. I run the cargo-command via SSH.

Update:  
I tried and after about 5 minutes atleast I got an error message:  
//  
Skipping git submodule `https://github.com/gtk-rs/gir-files` due to update strategy in .gitmodules  
Compiling librespot-protocol v0.4.2  
error: could not compile `librespot-protocol` (lib)

Caused by:  
process didn’t exit successfully: `/home/blossa/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/bin/rustc --crate-name librespot_protocol --edition=2018 /home/blossa/.cargo/registry/src/index.crates.io-6f17d22bba15001f/librespot-protocol-0.4.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=222 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C debuginfo=2 -C metadata=76ba2a514038c62a -C extra-filename=-76ba2a514038c62a --out-dir /home/blossa/gst-plugins-rs/target/release/deps -L dependency=/home/blossa/gst-plugins-rs/target/release/deps --extern protobuf=/home/blossa/gst-plugins-rs/target/release/deps/libprotobuf-bcff61ed037366da.rmeta --cap-lints allow` (signal: 9, SIGKILL: kill)  
//

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [February 29, 2024, 9:27pm UTC](https://discourse.mopidy.com/t/install-support-for-spotify/5902/4 "2024-02-29T21:27:16Z")

</div>

Killed probably due to memory exhaustion. It’s pretty painful trying to build on a pi 3.

Instead, try grabbing the armhf package at [https://github.com/kingosticks/gst-plugins-rs-build/releases/tag/untagged-9fcc04bf4f312d80c80e](https://github.com/kingosticks/gst-plugins-rs-build/releases/tag/untagged-9fcc04bf4f312d80c80e)

---

<div class="post-metadata">

**Author:** ![blossa69](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blossa69/32/2481_2.png) [@blossa69](https://discourse.mopidy.com/u/blossa69)\
**Post date:** [March 1, 2024, 6:43pm UTC](https://discourse.mopidy.com/t/install-support-for-spotify/5902/5 "2024-03-01T18:43:54Z")

</div>

I did not have the energy to build from source-code as it was so long time ago I did that (20 years?). I installed one of the debs and it worked directly.  
I got warning “mopidy Failed to lookup ‘spotify:directory’: Could not parse ‘spotify:directory’ as a Spotify URI”, but restarting server twice solved that.

Thank you!!!

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/system/32/1_2.png) [@system](https://discourse.mopidy.com/u/system)\
**Post date:** [March 4, 2024, 6:43pm UTC](https://discourse.mopidy.com/t/install-support-for-spotify/5902/6 "2024-03-04T18:43:57Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
