我想在 Debian 10 上从 R 项目存储库安装 R。需要以下软件包:
sudo apt install dirmngr -- install-recommends
sudo apt install software-properties-common apt-transport-https ca-certificates gnupg2
然后,如果我遵循例如https://www.digitalocean.com/community/tutorials/how-to-install-r-on-debian-10并做
sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
我最终出现以下错误:
Executing: /tmp/apt-key-gpghome.WVA4wGygKd/gpg.1.sh --keyserver keys.gnupg.net --recv-key E19F5F87128899B192B1A2C2AD5F960A256A04AF
gpg: keyserver receive failed: No name
答案1
解决方案是使用替代密钥服务器,例如keyserver.ubuntu.com
:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
然后添加相关存储库
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/debian buster-cran35/'
但是,sudo apt update
会导致以下错误:
Err:4 https://cloud.r-project.org/bin/linux/debian buster-cran35/ InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B8F25A8A73EACF41
Reading package lists... Done
W: GPG error: https://cloud.r-project.org/bin/linux/debian buster-cran35/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B8F25A8A73EACF41
E: The repository 'https://cloud.r-project.org/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.
这意味着该键要添加:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B8F25A8A73EACF41
然后可以使用例如简单地进行安装
sudo apt install r-base-core r-base-dev
我希望它对遇到类似问题的用户有用。