从CRAN Ubuntu存储库安装R:没有公钥错误 [英] Installing R from CRAN Ubuntu repository: No Public Key Error

查看:143
本文介绍了从CRAN Ubuntu存储库安装R:没有公钥错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是R版本2.13,并且想更新到较新的版本,以便使用某些依赖于R> = 2.14的软件包.

I am on R version 2.13 and would like to update to a newer version in order to use some packages that depend on R>= 2.14.

这里.然后,我导航到终端并输入:

I have the line to my sources.list file as found described here. I then navigate to the terminal and type:

sudo apt-get update

,并尝试在距离我最近的CRAN镜像上更新R时收到以下错误:

and get the following error when trying to update R on the CRAN mirror closest to me:

正在阅读包裹清单...已完成

Reading package lists... Done

W:GPG错误: http://lib.stat.cmu.edu oneiric/发布:由于公共密钥不可用,因此无法验证以下签名:NO_PUBKEY 51716619E084DAB9

W: GPG error: http://lib.stat.cmu.edu oneiric/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9

您知道如何调试此错误吗?

Any idea how to debug this error?

推荐答案

像@Ben Bolker一样(抱歉,我劫持了您的评论,但尚未发布正确的答案),位于

Like @Ben Bolker commented (sorry I hijacked your commented, but the correct answer was not yet posted), in the description of the debian package repo there is a section secure apt which says:

安全APT

SECURE APT

CRAN上的Debian反向移植档案文件使用以下密钥签名: 带密钥的"Johannes Ranke(CRAN Debian档案)" ID 381BA480.您可以使用

The Debian backports archives on CRAN are signed with the key of "Johannes Ranke (CRAN Debian archive) " with key ID 381BA480. You can fetch this with

gpg --keyserver subkeys.pgp.net --recv-key 381BA480或 或者,使用另一个密钥服务器,

gpg --keyserver subkeys.pgp.net --recv-key 381BA480 or alternatively, using another key server,

gpg --keyserver pgp.mit.edu --recv-key 381BA480如果不是这样 正常工作,可能是由于防火墙阻止了端口11371. 或者,您可以在以下位置搜索0x381BA480 http://keyserver.noreply.org/ http ://pgp.mit.edu/并将密钥块复制为纯文本 文件,例如,名为jranke_cran.asc.

gpg --keyserver pgp.mit.edu --recv-key 381BA480 If this doesn't work, it might be due to a firewall blocking port 11371. Alternatively, you can search for 0x381BA480 at http://keyserver.noreply.org/ or http://pgp.mit.edu/ and copy the key block into a plain text file, named, for instance, jranke_cran.asc.

如果使用gpg接收密钥确实有效,则需要将其导出到 文字文件

If receiving the key with gpg did work, you need to export it to a text file

gpg -a --export 381BA480> jranke_cran.asc在这两种情况下,您都需要 通过运行使apt系统知道密钥

gpg -a --export 381BA480 > jranke_cran.asc In both cases you need to make the key known to the apt system by running

apt-key将jranke_cran.asc添加为root.

apt-key add jranke_cran.asc as root.

如果您尚未执行此操作,则可能会解决您的问题.

If you have not already done this, this will probably fix your issue.

这篇关于从CRAN Ubuntu存储库安装R:没有公钥错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆