Debian

無法在 Debian 穩定版中安裝最新的 R 統計軟體包

  • January 2, 2020

我正在嘗試按照此頁面上的說明在 Debian Stable (Buster) 上安裝最新的 R 包:https ://cloud.r-project.org/

我在 /etc/apt/sources.list 中添加了以下內容:

deb https://cran.csiro.au/bin/linux/debian buster-cran35/

但是,當我執行時sudo apt-get update,出現以下錯誤:

$ sudo apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease                   
Hit:2 http://deb.debian.org/debian-security buster/updates InRelease  
Hit:3 http://deb.debian.org/debian buster-updates InRelease          
Hit:4 http://deb.debian.org/debian buster-backports InRelease        
Get:5 https://cran.csiro.au/bin/linux/debian buster-cran35/ InRelease [4,375 B]
Err:5 https://cran.csiro.au/bin/linux/debian buster-cran35/ InRelease
 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FCAE2A0E115C3D8A
Reading package lists... Done
W: GPG error: https://cran.csiro.au/bin/linux/debian buster-cran35/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FCAE2A0E115C3D8A
E: The repository 'https://cran.csiro.au/bin/linux/debian buster-cran35/ InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

儘管進行了以下嘗試,但我無法擺脫此 GPG 錯誤:

sudo apt-get install debian-keyring

sudo launchpad-getkeys

sudo aptitude install debian-archive-keyring

我該如何解決這個錯誤?

您需要使用錯誤消息中給出的 id導入存檔密鑰(假設您信任儲存庫):

apt-key adv --keyserver keys.gnupg.net --recv-key FCAE2A0E115C3D8A

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