3

I will need to install R (http://www.r-project.org/) on a number of machines which do not have internet access; many of them will be running Windows, but I suspect some might run Linux, if so, likely Ubuntu (this is all the info I have at hand). The official R download page for Ubuntu (and other Linux distros, https://cran.rstudio.com/bin/linux/ubuntu/) explains how to do it using sudo apt-get (as do numerous other tutorials on the web).

However, how does one go about doing that when there's no internet? Which files should I download and how should I install them? I looked into the folders listed on the aforementioned website, but there's gigabytes of files there, separated for each recent Ubuntu version. The computers I will have to install R on may or may not have the same version, and might have another distribution as well.

Being myself mainly a Windows user, I'm a bit lost here (I do have a Ubuntu VM, if that helps for solving the problem). For Mac and Windows there are installers in the R download section, but for Linux it just redirects to this page. I did already figure out how to deal with the installation of packages, and of RStudio, but installing core R puzzles me.

1 Answers1

2

The difficult method ...

You download all the DEB installers from the official packages site with all its dependencies and then install them with the command dpkg.

r-base lists (all links point to vivid; if you use another release change the URLs)...

Depends:

  • r-base-core (>= 3.1.2-2) GNU R core of statistical computation and graphics system

  • r-recommended (= 3.1.2-2) GNU R collection of recommended packages [metapackage]

Recommends

  • r-base-html GNU R html docs for statistical computing system functions

  • r-doc-html GNU R html manuals for statistical computing system

Suggests

  • ess Emacs mode for statistical programming and data analysis

  • r-doc-info or r-doc-pdf GNU R info or pdf manuals statistical computing system

You will need to drill down all the "depends" though.


An easier method ...

When your install "r" with the following 2 commands (you can also use a mirror for the latest release):

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

... that system will install all files related to "r" on that system but they will also remain on your system in /var/cache/apt/archives. All you need is to copy them over and install them on the other machine.

Problem here can be that this system already has something installed that the other systems do not yet have...


The command dpkg can be used to install separate DEBs with

dpkg -i {packagename1} {packagename2} {packagename3} {packagename4}
Fabby
  • 34,259
Rinzwind
  • 299,756
  • The easier method seems more reasonable. So to confirm - I'll get the files using apt-get on my VM, copy and move the files from the archive to the host computer, and run sudo dpkg -i filesfolder/*deb - or, something that I just found in another answer: "launch Synaptic and select File -> Add Package Downloaded"? Also,I assume this won't work if the host has a different (i.e. non-vivid) release? – user3554004 Jul 20 '15 at 14:23
  • Yes and yes on the latter too :) – Rinzwind Jul 20 '15 at 14:24
  • @user3554004 also see this http://askubuntu.com/a/650963/15811 – Rinzwind Jul 21 '15 at 14:38