Arch-Linux

是的錯誤:gpg:密鑰伺服器接收失敗:沒有名稱

  • November 20, 2021

我正在嘗試在 Arch linux 上使用 yay 安裝 spotify。但是當我執行yay -S spotify時會發生這種情況:

john@arch-thinkpad ~> yay -S spotify
:: There are 5 providers available for spotify:
:: Repository AUR
   1) spotify 2) spotify-dev 3) spotify-legacy 4) spotify094 5) spotio

Enter a number (default=1): 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo:1]  libcurl-gnutls-7.73.0-1
[Aur:1]  spotify-1:1.1.42.622-2

 1 spotify                                  (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: Downloaded PKGBUILD (1/1): spotify
 1 spotify                                  (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: spotify

:: PGP keys need importing:
-> --some-key--, required by: spotify
==> Import? [Y/n] y
:: Importing keys with gpg...
gpg: keyserver receive failed: No name
problem importing keys

如何修復此錯誤以成功安裝軟體包?

通過以下命令手動添加 gpg 密鑰解決了這個問題:

gpg --keyserver keyserver.ubuntu.com --recv-key <key name>

並再次執行安裝:

yay -S spotify

引用自:https://unix.stackexchange.com/questions/617259