当前位置: 首页>>技术教程>>正文


如何在Debian 9 Stretch Linux上安装Spotify

, ,

目的

以下Spotify设置过程概述了spotify.com提供的安装步骤。但是,在Debian Stretch上安装Spotify的过程中可能会遇到一些困难,请阅读下面的附录以解决这些问题。

要求

需要对Debian Stretch系统的特权访问。

困难

简单

约定

  • -要求linux命令可以直接以root用户身份或通过使用root特权以root特权执行sudo命令
  • $-要求linux命令以普通非特权用户身份执行

使用说明

包括Spotify的存储库

首先,我们需要包括Spotify的存储库签名密钥。执行以下命令并导入未过期的密钥。您的数字选择很有可能是1如下所示:


# gpg --keyserver hkp://keyserver.ubuntu.com --search-key 'Spotify Public Repository Signing Key'
gpg: data source: http://91.189.89.49:11371
(1)     Spotify Public Repository Signing Key 
          4096 bit RSA key EFDC8610341D9410, created: 2017-07-25, expires: 2018-07-25
(2)     Spotify Public Repository Signing Key 
          4096 bit RSA key 13B00F1FD2C19886, created: 2015-05-28, expires: 2017-11-22 (expired)
(3)     Spotify Public Repository Signing Key 
          2048 bit RSA key 082CCEDF94558F59, created: 2012-06-25, expires: 2015-06-25 (expired)
(4)     Spotify Public Repository Signing Key 
          1024 bit DSA key 4F9946354E9CFF4E, created: 2010-06-23, expires: 2012-06-22 (expired)
Keys 1-4 of 4 for "Spotify Public Repository Signing Key".  Enter number(s), N)ext, or Q)uit > 1
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key EFDC8610341D9410: public key "Spotify Public Repository Signing Key " imported
gpg: Total number processed: 1
gpg:               imported: 1

为了确认,因此列出所有导入的键运行:


# gpg --list-keys
/root/.gnupg/pubring.kbx
------------------------
pub   rsa4096 2017-07-25 [SC] [expires: 2018-07-25]
      0DF731E45CE24F27EEEB1450EFDC8610341D9410
uid           [ unknown] Spotify Public Repository Signing Key 

将Spotify的存储库添加到本地源并运行apt-get update


# echo deb http://repository.spotify.com stable non-free > /etc/apt/sources.list.d/spotify.list
# apt-get update


在Debian Stretch上安装Spotify

最后,我们准备使用以下命令在Debian Stretch上安装Spotify客户端apt-getcomcomnd:


#  apt-get install spotify-client

全部做完。您现在应该可以从开始菜单或命令行运行Spotify:


$ spotify

launch spotify on debian stretch linux run spotify on debian stretch linux

附录

gpg:密钥服务器接收失败:没有dirmngr

你不见了dirmngr二进制安装dirmngr包。


# apt install dirmngr

错误:


gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/tmp.t1Mi4lXT6P/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

spotify-client:取决于:libssl1.0.0,但无法安装

Debian Stretch包含更高版本的libssl。下载并安装libssl1.0.0从Debian Jessie仓库:


$ wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u7_amd64.deb
# dpkg -i libssl1.0.0_1.0.1t-1+deb8u7_amd64.deb

错误:


The following packages have unmet dependencies:
 spotify-client : Depends: libssl1.0.0 but it is not installable

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/7896.html,未经允许,请勿转载。