17

I want to update R with ubuntu from 3.0.3 to 3.1.2. I am working on Ubuntu 14.04LTS, 64bits.

I did the following:

cd /etc/apt/
sudo gedit sources.list

I added the following line :

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

Then :

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base

Some files were uploaded.

Then I checked the R version :

sudo R
version

platform       x86_64-unknown-linux-gnu    
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          0.3                         
year           2014                        
month          03                          
day            06                          
svn rev        65126                       
language       R                           
version.string R version 3.0.3 (2014-03-06)
nickname       Warm Puppy      

I still have the 3.0.3 version, can someone help me to upgrade to 3.1.2?

EDIT for ECII:

sudo apt-get dist-upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
blcr-util bwidget gcc-4.8-base:i386 ggobi jags libaudio2:i386 libcr0
libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386
libgcrypt11:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386
libglpk36 libgpg-error0:i386 libgstreamer-plugins-base1.0-0:i386
libgstreamer1.0-0:i386 libhwloc5 libibverbs1 libice6:i386 libjbig0:i386
libjpeg-turbo8:i386 libjpeg8:i386 libodbc1 libopenmpi1.6 liborc-0.4-0:i386
libqt4-dbus:i386 libqt4-declarative:i386 libqt4-network:i386
libqt4-opengl:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-xml:i386
libqt4-xmlpatterns:i386 libqtcore4:i386 libqtdbus4:i386 libqtgui4:i386
libqtwebkit4:i386 libquantlib-1.2 libsm6:i386 libsprng2 libsqlite3-0:i386
libssl1.0.0:i386 libstdc++6:i386 libtiff4 libtiff5:i386 libtk8.5 libtorque2
libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386
libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386
libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386
libxi6:i386 libxml2:i386 libxrender1:i386 libxshmfence1:i386 libxslt1.1:i386
libxss1:i386 libxt6:i386 libxv1:i386 libxxf86vm1:i386
linux-headers-3.13.0-35 linux-headers-3.13.0-35-generic
linux-image-3.11.0-26-generic linux-image-3.13.0-35-generic
linux-image-extra-3.11.0-26-generic linux-image-extra-3.13.0-35-generic lynx
mpi-default-bin openmpi-bin openmpi-checkpoint openmpi-common skype-bin:i386
tk-table tk8.5 unixodbc

EDIT for cdeterman:

sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub   1024D/437D05B5 2004-09-12
uid                  Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>
sub   2048g/79164387 2004-09-12

pub   1024D/FBB75451 2004-12-30
uid                  Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>

pub   4096R/C0B21F32 2012-05-11
uid                  Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>

pub   4096R/EFE21092 2012-05-11
uid                  Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>

pub   1024D/3E5C1192 2010-09-20
uid                  Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>

pub   1024R/579F147D 2010-04-25
uid                  Launchpad RKWard Development Archive

pub   2048R/E084DAB9 2010-10-19 [expire : 2015-10-18]
uid                  Michael Rutter <marutter@gmail.com>
sub   2048R/1CFF3E8F 2010-10-19 [expire : 2015-10-18]
Chika
  • 1,455
  • 2
  • 16
  • 24
  • Possibly grab this link from the `cran.r-project.org` pages on linux installations? http://cran.r-project.org/bin/linux/ubuntu/trusty/r-base-core-dbg_3.1.2-1trusty0_amd64.deb – Carl Witthoft Dec 03 '14 at 13:12
  • what is sudo apt-get dist-upgrade giving you? – ECII Dec 03 '14 at 13:28
  • Can you make sure the key was added successfully with `sudo apt-key list`? It should be near the bottom. Also, you shouldn't need the `install r-base` command as R is already installed. Adding the repo to your sources.list should allow `sudo apt-get update && sudo apt-get upgrade` to work. – cdeterman Dec 03 '14 at 13:28
  • 1
    BTW, you certain Rstudio is a valid repository? Did you try any other? – Carl Witthoft Dec 03 '14 at 13:35
  • OK, I can reproduce this behavior. I suspect the Ubuntu repositories do not reflect the latest `.deb` packages available such as the one I linked to in a previous comment. – Carl Witthoft Dec 03 '14 at 13:40
  • The manual method posted [here](http://stackoverflow.com/questions/10476713/how-to-upgrade-r-in-ubuntu) works for me with the Berkeley repository if you are not partial to the Rstudio repo. – cdeterman Dec 03 '14 at 13:46
  • @CarlWitthoft I tried with `deb http://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu/ trusty/` bit it does the same. @cdeterman : I tried too but nothing changed @ECII I updated my post because the answer was too long to be in a comment – Chika Dec 03 '14 at 14:06
  • @cdeterman I also edited my post to show what I get with 'sudo apt-key list' the key is taken into account. – Chika Dec 03 '14 at 14:12
  • When I look at Synaptic I see that r-base 3.1.2-1trusty0 is installed. So maybe it is a problem with a path in R? – Chika Dec 03 '14 at 14:18
  • Shouldn't this be on askubuntu? – Kalin Apr 15 '15 at 19:17

1 Answers1

3

Ok, I fixed it.

In synaptic package manager, I saw that R-3.1.2 was installed in the following directory (and the executable is called R) : /usr/lib/R/bin/R

And when I type

which R

It returns:

/usr/local/bin/R

So the source of R is not the same path than the one which was updated. I've just copy-pasted the new executable (which was in /usr/lib/R/bin/ in the good directory /usr/local/bin/).

Chika
  • 1,455
  • 2
  • 16
  • 24