Skip to content
Advertisement

Upgrade R version 2.15.1 to 3.3 on Debian server (linux-gnu)

I’m in internship and I’m working on a Debian server for my R’s scripts.

However, the version installed on the server is really outdated (2.15.1) and I think, it might be the reason of some errors I have with my scripts (which work on my windows PC with R 3.3).

But I am totally a beginner with Linux and I’m stuck.

I know there is a tutorial (https://cran.r-project.org/bin/linux/debian/) but it’s a very specific vocabulary I don’t understand completely + my inexperience with Linux servers make it hard to understand exactly what I have to do.

Is it possible to have more explanations on how to install R 3.3 on Debian server ?

Here are the details from sessionInfo() of the server :

  • R version 2.15.1 (2012-06-22)
  • Platform : i486-pc-linux-gnu (32 bit)

Advertisement

Answer

I would suggest that you install the ‘-dev’ version of base R

sudo apt-get install r-base r-base-dev

and then as a regular user use R’s install.packages() to install additional packages. This will result in an installation where R and it’s base packages are accessible to all but owned by root (and therefore difficult for a regular user to update / mess up) and other packages belong to the regular user (and hence easy to update).

Some packages may have system dependencies, e.g., XML requires the libxml2 and libcurl libraries. The ‘-dev’ version of these libraries also need to be installed, most easily via apt-get

sudo apt-get install libxml2-dev libcurl4-openssl-dev

It may be that your version of apt knows nothing about r-base / r-base-dev. You should then follow the section ‘Installing R-devel or a release branch from svn’ in the document you mention; skip over the instructions in the ‘R-devel’ section, and instead follow ‘r-patched’.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement