Can't find or run spotify after `snap install spotify`

42,908

Solution 1

Check your $PATH variable by executing in a Terminal:

echo $PATH

The output should be very similar to this:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin

You have to verify if /snap/bin is included in this $PATH, otherwise you have to add it manually, here is how to do it: How do I modify my PATH so that the changes are available in every Terminal session.

If this doesn't work, try deleting and installing again the snap, the required commands are:

  • Execute sudo snap list to verify if Spotify is installed.

  • Use sudo snap remove spotify to delete it.

  • Use sudo snap install spotify to re-install it again.

After installing it you can run the command which spotify to see if it is recognized now.

Hope it helps, good luck!

Solution 2

The solution is simple. Log out and log back in again.

Same thing happened to me. It was the first time I had installed a snap app, and I expect that the $PATH variable had changed as per other answers, but the change only takes effect after logging out and logging back in again.

Solution 3

Personally, I simply had to open a different Terminal window. For some reason it couldn't find it from the window I'd used to run the snap command.

Share:
42,908
user126350
Author by

user126350

Updated on September 18, 2022

Comments

  • user126350
    user126350 over 1 year

    I am using Ubuntu 16.04, running this command succeeded:

    sudo snap install spotify
    

    And running it again indicates Spotify is installed. However, running:

    spotify
    

    Gives command not found! Searching in Unity for "spotify" yields no results. What can I do?

    • Terrance
      Terrance over 6 years
      Try /snap/bin/spotify to launch it. You might not have the /snap/bin in your path.
    • user126350
      user126350 over 6 years
      That exists and runs, but nothing happens afterwards.
  • Terrance
    Terrance over 6 years
    Thank you! I was going to mention to OP to add /snap/bin to the path as I just tested out spotify and it worked fine. +1 =)
  • user126350
    user126350 over 6 years
    Thanks just reinstalled after augmenting the path and it seems to be working now (although takes a solid 15 seconds to load).
  • Terrance
    Terrance over 6 years
    @user126350 Yep, that is one thing I noticed is that it was slow to come up.
  • galoget
    galoget over 6 years
    You're welcome to both of you, glad to hear that! :D
  • Bprodz
    Bprodz almost 6 years
    source ~/.profile should have the same effect if you don't want to open a new terminal.
  • evaristegd
    evaristegd about 4 years
    @Bprodz , yours is the right answer. Please consider posting it as an answer so I can upvote it. Let me know when you do.