Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been unsuccessfully trying to install the latest version (2.15.2) of r-base. Apparently, R package Rcpp would not install for R version 2.14.1 - the version that installs for me.

I am not sure what/how/where to change my installation attempts which appear below. Please note that I am using ubuntu-12.04.1-server-i386.

(1) ------------> The current installed version is R version 2.14.1 (2011-12-22)

sudo apt-get install r-base
Reading package lists... Done
Building dependency tree       
Reading state information... Done
r-base is already the newest version.

(2) ------------> Including version information doesn't help:

sudo apt-get install r-base=2.15.1-5ubuntu1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '2.15.1-5ubuntu1' for 'r-base' was not found

(3) -------------> Changes based on CRAN Ubuntu instructions from http://cran.r-project.org/bin/linux/ubuntu/README

3.1: Added to /etc/apt/sources.list

deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu quantal/

3.2: Update and install

sudo apt-get update
sudo apt-get install r-base
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-base : Depends: r-base-core (>= 2.15.2-1quantal2) but it is not going to be installed
          Depends: r-recommended (= 2.15.2-1quantal2) but it is not going to be installed
          Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
share|improve this question
Have you tried sudo apt-get upgrade or sudo apt-get dist-upgrade? – Salem Nov 18 '12 at 4:35
@Salem, thanks for your comment. Yes, I have tried "upgrade" but that doesn't upgrade "R" to its latest version. – Student Nov 19 '12 at 16:46

2 Answers

In my system (without R installed) that versions installs correctly. So maybe the best option is to uninstall the old R and install the newer, passing the specific version you want. But before you do that, make a backup of your operating system. It can be difficult to reinstall old the packages after you remove them.

Also just a note: if you do sudo apt-get install r-base=2.15.1-5ubuntu1 it will not find a package because the version is wrong. In that repo, the files are named, for example r-base_2.15.2-1quantal2_all.deb, so the correct version should be r-base=2.15.2-1quantal2 or r-base=2.15.2-1quantal2_all, for example.

Hope this helps.

share|improve this answer

open the terminal and type sudo -s. Then open source.list by typing:

gedit /etc/apt/sources.list

then, add these lines to the file:

deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu quetzal/

then save& exit gedit. In the terminal type

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 
gpg -a --export E084DAB9 | sudo apt-key add -

then type

exit

then type these commands --one line at a time--.

sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.