Offline Install of R on RedHat - r

I am trying to install R on a RedHat server with no connectivity to the Internet. (sigh)
Initially, I tried with R meta package from EPEL (http://fedoraproject.org/wiki/EPEL).
Due to dependency requirements, I downloaded dependancies Rcore ,libRmath, etc...
Each time it prompts for a dependency, I download, transfer and install.
This takes time and manual effort.
Is there a cleaner way to do this than the manual download, transfer and install of every single dependency?
Note: The server has no internet connection, so yam is not helpful.

Have you thought of simply compiling R from source?
I usually do that, and it is relatively painless.
The thing is that when you do the ./configure step
you should get a list of all librarires that you
need before you issue make.
It might be less of a hazzle than the redhat install
you are doing.

I believed we are unable install R without online (unless there was someone download the installer and pass to you). You can refer to Setup ®Studio Server (CentOS/RHEL 7). Hope this helps.

One thing you could do is install R on a server with internet access.
Install Rtools.
Then you install all the packages you need with the option destdir of install.packages.
You will then get a folder with all the packages you will need.

Related

Air-gapped env- Installing R package source vs binaries

We have a ubuntu linux server in our office which is a air-gapped environment. There is no internet access to external network.
However I would like to install few R packages like ggplot2, Database Connector, dplyr, Tidyverse etc. I have more than 10-15 packages to download
While I cannot write the usual command install.packages("DatabaseConnector"), I have to download the zipped folders from CRAN as shown here.
I am new to R. So, can you help me with my questions given below?
a) Why is there are no files for linux systems? I only see windows binaries and macOS binaries. Which one should I download?
b) Should I download binaries or package source? which one is easy to install?
c) When I download packages like above as zipped file from CRAN like shown here, will the dependencies be automatically downloaded as well? Or should I look at error messages and keep downloading them one by one?
d) Since I work in a Air-gapped environment, what would be the best way to do this process efficiently.
Under linux packages are always installed from source. There are no official binary packages for linux. However, your distro might offer some of them in the official repositories. Ubuntu does. However these tend to be quite old versions and usually limited to a handfull of the most important packages. So, for linux you have to download the source packages. The zip files are for windows and will not work.
You will also need to download all of the dependencies of the packages. For something like tidyverse this will be a huge number. Tracking those by hand is a lot of work. Easiest is probably to use a package like miniCRAN outside of your airgapped system to build a selective copy of CRAN. You can specify the packages you want and the package will download all dependencies. You can then copy the downloaded directories to your server, point install.packages in the right direction and install as usually using install.packages. For details see https://andrie.github.io/miniCRAN/articles/miniCRAN-introduction.html.
You might also run into the problem that your system does not have all of the depencies needed to build all of the packages. Under ubuntu you need for example to install libxml2-dev to be able to install the xml package. For that you need to use the package manager of ubuntu. How to do that on an airgapped system is another issue

Can't install a package with an error: "Currently it is not possible to install binary packages from a remote repository as root"

I was unable to install a R package through GUI R.app on macOS, using a package installer GUI. In the past, I was able to install it without any problems.
The problem is when I tried to install a package, an error Currently it is not possible to install binary packages from a remote repository as root. occurred. I might not be good at the system-level knowledge, so want to use GUI as I have used it. But what is preventing the GUI from working any longer? Maybe from Yosemite it is no longer working?
And finally, is it still possible to use GUI package installer in this situation?
UPDATE
Hmmm... It seems that after updating to 3.3.1 (I used 3.3), the problem has gone away. I can install packages both at User Level and System Level without any problems. I don't know why, but someone can clarify it in case I would face the same problem in the future?

Difference between nginx installed from source and nginx install as package?

What all are the differences between install nginx from source and install as package ?
Well to define "all differences" would be near impossible because every OS package is built differently. However, with that said...
1) Package installs are pre-built with their own options configured which also gets installed wherever they decided to put that installation once it's installed.
2) With the source, you are able to define what is built, where it should be installed, etc...
So if you are going to install via a package, you are basically forced into whatever options they set. Unless of course you decide to take their package and then re-package it to fit your requirements. But that would pretty much be a pointless as you'd be better off just installing from source at that point.
Most if not all packages also comes not only with a simple install but a simple way to uninstall the software. Where-as if you compiled and installed via source then you'll need to manually remove the installation if you no longer need it on your machine.

How can I build a stand alone R engine with some packages included?

I have a windows server that does not allow me to install anything but it allows me to run exe files (Meaning that I cannot simply download the R installation package and install R that way). I want to run R on it and I like to know if it is possible for me to make an R.exe with some packages like ggplot and lattice included?
Do you have any filestore on the server? I can't imagine that you wouldn't have. You can install packages to any directory, which can then be your own personal library. Look at the help(install.packages) and help(library) and there's a lib or lib.loc argument that tells it where to stick it.
If the reason you can't install is because install.packages can't get through the network to CRAN, then download the binary from CRAN, transfer it to the server, and install that way.
Note that I didn't answer your question about building an R exe with bundled packages (here's that answer: "No") because you thought the answer to that question was the solution to your real problem ("I can't install packages"). Always ask a question to your original problem...
I ran across the portable version of R that could do it for me. It generates a folder that can be moved to the new server.
http://sourceforge.net/projects/rportable/

most common config flags for installing R from source on 64-bit Ubuntu

I'm convinced that using Dirk's package is the best way to install and maintain R on an Ubuntu system. But I want to have some fun and get used to installing R from source.
What are the most common configure flags to use when installing?
Also, if I want to install 2.14.1 and I have 2.14.0 currently installed (which was installed from source), should I first uninstall 2.14.0?
There was a recent thread somewhere about having several versions---one from the apt-get repo, one in /usr/local. Try to find that...
Otherwise, I will roll up 2.14.1 on Friday morning, Michael will do his magic and the repo will have .deb packages of 2.14.1 'real soon', sometimes within a day.
Lastly, you can see which flags are used by getting the package sources for which you just do apt-get source r-base (and that works for any Debian/Ubuntu package that way if you have source references in apt's file.
Edit: By the way, regarding the '64-bit' aspect of your question: Nada. We don't do anything differently. It is "merely" the host OS being more generous with resources. But R finds all it needs to know on its own via its configure etc logic.

Resources