5
votes

I am newbie to both Ubuntu and R.

I am trying to install R 2.15.2 on ubuntu. Since the latest version of R is 3.0.X, I specified the version in /etc/apt/sources.list

deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise 2.15.2

Then I ran sudo apt-get install r-base.

It installs, but when I check version, it is 2.14.1, not 2.15.2

I tried to specify version in command line, such as:

sudo apt-get install r-base_2.15.2_1precision1

Always seeing:

E: Unable to locate package r-base_2.15.2_1precision1.
E: Couldn't find any package by regex 'r-base_2.15.2_1precision1'

Any suggestion? Thanks.

If I run command:

sudo apt-get install r-base=2.15.2-1precise0

See the following message:

The following packages have unmet dependencies:
r-base : Depends: r-recommended (= 2.15.2-1precise0) but 3.0.1-1precise0precise2 is to be installed
Recommends: r-base-html but it is not going to be installed

2
after adding the deb entry in sources.list did you run apt-get update ?Ahmed Masud
Hmm, after I do apt-get update, I am seeing 404 not found error:Error is W: Failed to fetch cran.ma.imperial.ac.uk/bin/linux/ubuntu/dists/precise/2.15.2/… 404 Not FoundBlueDolphin

2 Answers

8
votes

Find the solution.

I need to install like:

sudo apt-get install r-base-core=2.15.3-1precise0precise1
sudo apt-get install r-recommended=2.15.3-1precise0precise1
sudo apt-get install r-doc-html=2.15.3-1precise0precise1
sudo apt-get install r-base=2.15.3-1precise0precise1
1
votes

Okay so the URL for where the packages are found has changed :^) on the cran.ma site:

Change the debian url to:

deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu precise/

do an apt-get update and try reinstalling

The complete instructions are on:

http://cran.ma.imperial.ac.uk/bin/linux/ubuntu/