Deepak Yadav Deepak Yadav - 1 month ago 12
Linux Question

installing R in UBUNTU 16

Steps I followed:


  1. add R repo:
    sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list

  2. add keys:
    gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9



Result after using 2nd command


gpg: requesting key E084DAB9 from hkp server subkeys.pgp.net
gpgkeys: key E084DAB9 can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver helper general error
gpg: keyserver communications error: unknown pubkey algorithm
gpg: keyserver receive failed: unknown pubkey algorithm



I searched for the problem and I tried:


  • Since I am using proxy so I have added
    export http_proxy=http://username:password@10.1.1.16:80
    and
    export https_proxy=https://username:password@10.1.1.16:80
    in
    bash.bashrc
    .




Still Same error



  • Problem may be due to firewall: I have change
    port number




Still Same error



  • Manually copy the key




Version: SKS 1.1.5

Comment: Hostname: pgp.mit.edu

mQGiBEXUFiURBADkTqPqcRYdLIguhC6fnwTvIxdkoN1UEBuPR6NYW4iJzvRSas/g5bPo5ZxE
2i5BXiuVfYrSk/YiU+/lc0K6VYNDygbOfpBgGGhtfzYfFRTYNq8QsdD8L8BMYtOu5rYo5BYt
a0vuantIS9mn9QnH7885uy5tX/TXO7ICYVHxnFNr2wCguNtMdz9+DRQ38n4iiHzTtj/7UHsD
/0+0TLHHvY1FfakVinamR9oCm9uH9PmkGTy6jRnrvg5Z+TTgygiDdTBKPc1TqpFgoFtqh8G5
DpDPbyh5GzBj8Ky1mBJb3bMwy2RUth1cztHEWI36xuCl+KrLtA4OYuCwJJZhOWDIO9aO2LW5
kJhIwIuvSrEtOgTxpzy82g7eEzvLBADUrQ01fj+9VDrO2Vept8jtaGK+4kW3cBAG/UbOrTjt
63VurXwyvNb6q7hKFUaVH42Fc0e64F217mutCyftPWYJwY4SR8hUmjEM/SYcezUDWWvVxmkF
8M4rMhHa0j+q+et3mTKwgxehQO9hLUqRebnmJuwNqNJKb9izsPqmh83Zo7Q7Sm9oYW5uZXMg
UmFua2UgKENSQU4gRGViaWFuIGFyY2hpdmUpIDxqcmFua2VAdW5pLWJyZW1lbi5kZT6IRgQQ
EQIABgUCRdQ+nQAKCRAvD04U9kmvkJ3+AJ4xLMELB/fT1AwtR1azcH0lKg/TegCdEvtp3SUf
aHP3Jvg2CkzTZOatfFuIRgQQEQIABgUCS4VoCgAKCRDvfNpxC67+5ZFyAKCAzgPTqM6sSMhB
iaZbNCpiVtwDrQCgjMy+iqPm7SVOCq0XJsCCbxymfB+IXgQTEQIAHgUCRdQWJQIbAwYLCQgH
AwIDFQIDAxYCAQIeAQIXgAAKCRAG+Q3lOBukgM09AKCuapN6slttAFRjs2/mgtaMMwO9sgCf
ZD2au39Oo8QLXZhZTipN8c7j9mM=
=BRgm



and save it to a file
jranke_cran.asc
.

Then add apt key using
sudo apt-key add jranke_cran.asc


error


gpg: no valid OpenPGP data found.


I have tried a lot and still unsuccessful. Any help will be appreciated.

Answer

It seems gpg cannot access the key server, most probably you have a proxy configuration issue.

According to this other post, the correct key is a bit different from what you posted:

Public Key Server -- Get ``0x51716619e084dab9 ''

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.0.10

mQENBEy9tcUBCACnWQfqdrcz7tQL/iCeWDYSYPwXpPMUMLE721HfFH7d8ErunPKPIwq1v4Cr
NmMjcainofbu/BfuZESSK1hBAItOk/5VTkzCJlzkrHY9g5v+XlBMPDQC9u4AE/myw3p52+0N
XsnBz+a35mxJKMl+9v9ztvueA6EmLr2xaLf/nx4XwXUMSi1Lp8i8XpAOz/Xg1fspPMRhuDAG
YDnOh4uH1jADGoqYaPMty0yVEmzx74qvdIOvfgj16A/9LYXk67td6/JQ5LFCZmFsbahAsqi9
inNgBZmnfXO4m4lhzeqNjJAgaw7Fz2zqUmvpEheKKClgTQMWWNI9Rx1L8IKnJkuKnpzHABEB
AAG0I01pY2hhZWwgUnV0dGVyIDxtYXJ1dHRlckBnbWFpbC5jb20+iQ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JjGNJ1Zz0Zp8hV/IPLoIv1OIocWov27YLcr6EnXuvXvU/MSm97YifdG9
UYCE99nHTioSM0Q3cgpu5EppVNrc232gyG2vlHzhsstNBx55cUmAX2fEzxuRipLS0iq4L0zU
Gdgdjn4noGDzGA==
=BF1w
-----END PGP PUBLIC KEY BLOCK-----

Save this to a file and import with sudo apt-key add. It should work.

Comments