mathlete
mathlete

Reputation: 6682

Error "Unable to find a source package for r-base" on Debian Testing

Before installing R from source, I normally do "sudo apt-get build-dep r-base" which always worked under Ubuntu. Now I have a Debian (Testing) machine with LXDE and when executing the above, I obtain "E: Unable to find a source package for r-base". What might be the cause of this error?

Update

I forgot to add deb http://stat.ethz.ch/CRAN/bin/linux/debian jessie-cran3 and deb-src http://stat.ethz.ch/CRAN/bin/linux/debian jessie-cran3 to /etc/apt/sources.list. After sudo apt-get update, I obtained:

Reading package lists... Done
W: GPG error: http://stat.ethz.ch jessie-cran3/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 06F90DE5381BA480

As the section cran.r-project.org -> Download R for Linux -> debian -> SECURE APT says, a key needs to be added. As this failed, I did it slightly differently via sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key <NUMBER> where <NUMBER> is the number given above, so 06F90DE5381BA480

Upvotes: 4

Views: 2986

Answers (1)

alex89
alex89

Reputation: 41

This worked for me:

sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/" >> /etc/apt/sources.list'

sudo apt-key adv --keyserver keys.gnupg.net --recv-key 381BA480

sudo apt-get update

sudo apt-get install r-base

Upvotes: 4

Related Questions