Install R-base 3.1.0 in Ubuntu 14.04

  • by
  • 3 Years ago
  • 31

R is a free software environment for statistical computation and graphics.  It consists of a language plus a run-time environment with graphics, a debugger, access to certain system functions, and the ability to run programs stored in script files. Steps to installing this on Ubuntu 14.04 Trusty Tahr 64bit OS

Step 1: Uninstall Previous R-base installation

sudo apt-get remove r-base-core

Step 2: Update Sources.List File

– Edit the sources.list file

sudo gedit /etc/apt/sources.list

– Add following entry

deb http://cran.rstudio.com/bin/linux/ubuntu trusty/

Step 3: Add the Public Keys

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

Step 4: Install R-base

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base

Step 4: Launch R-base

R

r-base-310-01

  • facebook
  • googleplus
  • twitter
  • linkedin
  • linkedin
  • fcastillocarmona

    Thank you… Works perfecto now

  • sysads

    fcastillocarmona
    You are welcome

  • sumanv10

    It keeps saying this to me, doesnt install it at all :
    The following packages have unmet dependencies:
    r-base : Depends: r-base-core (>= 3.1.0-1precise0) but it is not going to be installed
              Depends: r-recommended (= 3.1.0-1precise0) but it is not going to be installed
              Recommends: r-base-html but it is not going to be installed

  • sysads

    sumanv10
    what version of Ubuntu are you installing on and is it 64bit or 32bit?

  • smm7aa

    sysads sumanv10 
    I am having a similar issue and haven’t found a way past it. I’m running 64-bit Ubuntu 14.04

    The following packages have unmet dependencies:
    r-base : Depends: r-recommended (=3.1.1-1trusty0) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

  • sysads

    smm7aa sysads sumanv10
    Do this to install the latest release 3.1.1 via PPA:
    sudo add-apt-repository ppa:marutter/rrutter
    sudo apt-get update
    sudo apt-get install r-base r-base-devI will soon post this

  • smm7aa

    sysads 
    I tried the command from one of your earlier comments ( apt-cache showpkg r-base)
    Here is what it said.
    Package: r-base
    Versions:
    3.1.1-1trusty0 (/var/lib/apt/lists/pa.launchpad.net_marutter_rrutter_ubuntu_dists_trusty_main_binary-amd64_Packages)
    Description Language:
    File: /var/lib/apt/lists/ppa.launchpad.net_marutter_rrutter_ubuntu_dists_trusty_main_binary-amd64_Packages MDS 5787ca79ed716232c44cc2087ed9b425b
    Reverse Depends:
    r-doc-info,rbase 1.4.1-1
    r-doc-html,rbase 1.4.1-1
    r-base-html,rbase 1.4.1-1
    r-base-core,rbase 1.4.1-1
    Dependencies:
    3.1.1-1trusty0 – r-base-core (2 3.1.1-1trusty0) r-recommended (5 3.1.1-1trusty0) ess (0(null)) r-doc-info (16 (null)) r-doc-pdf (0 (null)) r-base-html (0 (null)) r-doc-html (0 (null))
    Provides:
    3.1.1-1trusty0 –
    Reverse Provides:

  • smm7aa

    sysads smm7aa
    the link you’ve provided still results in the same error message about unmet dependencies. there is obviously something missing with regards to the r-recommended package for 3.1.1

  • smm7aa

    sysads 
    Turns out that R is installed, just there is some missing packages, no problem since those can be installed manually. The error message was just a little misleading since it appeared that the installation was unsuccessful overall.

  • sysads

    smm7aa sysads
    interesting! run this command and see if it install missing deps
    sudo apt-get -f install

  • smm7aa

    sysads smm7aa 
    After running sudo apt-get -f install, looks like no action was taken:
    Reading package lists… Done
    Building dependency tree
    Reading state information… DOne
    0 upgraded, 0 newly installed, 0 to remove and 332 not upgraded.
    I am thinking that R installs, but r-recommended and its bundle of packages are not installed. So I checked and that seemed to be the case. Every package listed as being part of the r-recommended bundle was not installed on my machine (e.g.

    r-cran-boot
    r-cran-class
    r-cran-cluster…) But this is not a big deal, I just installed them manually.

    Thanks for taking the time to help here.

  • sysads

    smm7aa sysads
    Ah OK, interesting to know

  • Fred

    Thanks, totally worked

  • Vinícius Oliveira

    I’ve got one problem in the step 3 when I run:

    gpg –keyserver keyserver.ubuntu.com –recv-key E084DAB9

    gpg: keyserver timed out

    Ps.: I checked my internet connection and it is ok.

  • Niloufar

    Hi,
    I did all these steps on ubuntu 13.0.4. And I broke some packages as I got this error:

    The following packages have unmet dependencies:
    r-base-core : Depends: libtcl8.6 (>= 8.6.0) but it is not installable
    Depends: libtiff5 (>= 4.0.3) but 4.0.2-4ubuntu3.1 is to be installed
    Depends: libtk8.6 (>= 8.6.0) but it is not installable
    Recommends: r-recommended but it is not going to be installed
    Recommends: r-base-dev but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

    Then I found out that those steps just work for ubuntu 14.0. Isn’t there any way I can fix this? I can’t install even R 3.0 right not.

  • So Nice, you saved my Mooc! I had the version 3.0.2 but tm library is not present on this version!
    Big Thanks!

  • JaimePerales

    Thanks! it worked for me

  • tijoalca

    worked perfectly in Elementary OS Freya! Thanks!

  • Quis103

    thank you this worked for me

  • mkzakaria

    Wonderful, thanks. And a note to follow user, you need to move to this new version to get many packages working.

  • shivani shah

    I tried this in 14.04 LTS, but it would not update. I would just get 3.0.2 version.

    When I tried installing any version above 3.0.2 from ubuntu software centre, I get following error :

    The following packages have unmet dependencies:
    r-base: Depends: r-base-core (>= 3.2.2-1trusty0) but 3.2.2-1trusty0 is to be installed
    Depends: r-recommended (= 3.2.2-1trusty0) but 3.0.2-1ubuntu1 is to be installed

    Any clue why?

  • Dmitry

    Work well on Ubuntu 14.04, thanks.

  • David

    Works perfectly on ubuntu 16.04.1 LTS