Installing R from CRAN Ubuntu repository: No Public Key Error

前端 未结 9 973
长情又很酷
长情又很酷 2020-12-13 01:29

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

相关标签:
9条回答
  • 2020-12-13 02:16

    The simplest solution that worked for me was from Emre Sahin in this thread:

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 
    
    0 讨论(0)
  • 2020-12-13 02:16
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYID
    

    and replace KEYID with the number shown in the error message.

    0 讨论(0)
  • 2020-12-13 02:19

    Here is a step-by-step answer that might be easier to follow.

    1. Fetch the key (the last 8 digits in the warning message):

      gpg --keyserver pgp.mit.edu --recv-key E084DAB9
      

      The output should look like this:

      gpg: requesting key E084DAB9 from hkp server pgp.mit.edu
      gpg: key E084DAB9: public key "Michael Rutter <marutter@gmail.com>" imported
      gpg: Total number processed: 1
      gpg:               imported: 1  (RSA: 1)
      
    2. Add the key (superuser access required):

      gpg -a --export E084DAB9 | sudo apt-key add -
      
    3. Update the repositories:

      sudo apt-get update
      

    There should be no warning about the missing key now.

    0 讨论(0)
提交回复
热议问题