I am working on an off-line Ubuntu server and I would like to write an IPython notebook with only R code. I understand that for this to work I need to install the IRkernel. This shouldn't be a problem if the server was on-line, but unfortunately this is not the case. Any suggestions how to install the IRkernel off-line are greatly appreciated.
Oliver
(I have installed Anaconda3-2.2.0-x86-64 and R 3.0.2 on the Ubuntu server)
You can use Cube to download the required Ubuntu packages (I think just zmq3) on an online computer and then install it on your offline server.
You would then need to download the needed R packages (rzmq,repr,IRkernel,IRdisplay - in tar.gz form)
To load those into your server you can use the following commands to install the R packages from source.
R CMD INSTALL package_ x.y.z.tar.gz
If you don't have permission to write to the standard library directory and can't use sudo to override, you can install it somewhere else via
R CMD INSTALL -l <user_lib> package_x.y.z.tar.gz
where <user_lib> is a directory you can write to. You may need to specify lib.loc when subsequently loading the package, if <user_lib> is not in .libPaths)
See this manual for more information; R CMD INSTALL --help may also be useful
It's a less than ideal solution but it should work assuming there aren't any dependancies I've missed.
Related
Regardless of whether I run R or sudo R, when I then run install.packages("name") the packages always gets installed into /home/james/R/... as opposed to a system library.
(I need the packages in the system library so that Shiny Server can find them)
How do I make R install into the system library instead of a user specific one?
I found this on Dean Attali's guide to setting up a shiny server:
sudo su - -c "R -e \"install.packages('<PACKAGE>', repos='http://cran.rstudio.com/')\""
My understanding is that you're essentially installing the package globally as the root user so that any user can access it. Seems to work well for me so far.
We need to install R-base version 3.5+ on an offline machine running SLES12.3
We have downloaded all the packages from the the SUSE r repo
http://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_12.3/x86_64/
while running zypper install on the packages there are additional dependencies that we are not able to find the relevant packages to download.
These include:
libtcl8.5.so()(64bit)
libgomp.so.l()(64bit)
But we are not able to find the dependency package that include these libraries.
What should be the correct approach for installing these libraries offline? where can we find these libraries?
Is there a better way for offline installing R-base ? we tried to follow the instructions on the cran rstudio page
The files you downloaded don't match the distribution you're running. SUSE Linux Enterprise (SLE) and openSUSE are similar in some ways, but these are really two separate distributions and you can not always mix binaries between the two. To install R on SLE Server 12.3, you should use the repository https://download.opensuse.org/repositories/devel:/languages:/R:/released/SLE_12/.
You can find out these URLs by looking at the right hand-side column at https://build.opensuse.org/project/show/devel:languages:R:released. Look for things called "SLE" there.
Install the Development Tools, according to this answer
zypper install --type pattern Basis-Devel
Download R source and install it
wget http://cran.univ-paris1.fr/src/base/R-3/R-3.5.0.tar.gz
tar zxf R-3.5.0.tar.gz
cd R-3.5.0
./configure --enable-R-shlib
make
make check
make install
Maybe there are still dependencies missing, which need to be installed with zypper (I don't have any Suse to try myself). With this method you have an "empty" R and you will install R packages one by one (with R CMD INSTALL). Maybe not the best answer for your need, but an answer.
I have the following issue:
I created a R package which is ending in *.tar.gz and I want to just upload this to the ubuntu server and install it into opencpu from the servers file system without using github (as Im not familiar with github that much yet).
I have the following configuration:
Ubuntu 14.04 running opencpu /opencpu-cache on it
Installed R
Installed RStudio
I haven't found any guideline which points into this direction.
Does anyone have some guidance on how a R package (tar.gz) can be installed in Opencpu without using Github?
Thank you!
There is nothing special about packages that you use with OpenCPU. Install it like any R package:
R CMD INSTALL yourpackage_1.2.tar.gz
If you are not root and you want to install in the global library you might need sudo:
sudo R CMD INSTALL yourpackage_1.2.tar.gz --library=/usr/local/lib/R/site-library
Afterward installing you should be able to interact with the package via e.g.
curl http://localhost/ocpu/user/yourname/library/yourpackage/R
curl http://localhost/ocpu/library/yourpackage/R
I am using R CMD INSTALL to install libraries from a folder with .zip binaries to my rlibs directory. When I do this, many folders for each library are installed in the rlibs directory. Take for example the bit package. I have downloaded the bit_1.1-12.zip file from https://cran.r-project.org/web/packages/bit/index.html.
Now I install it by using the following command:
R CMD INSTALL --library=./r_libs ./external/bit_1.1-12.zip
This will create a file structure underneath the folder ./r_libs/bit
Now here is my question: How can I install only the essential library files that R needs to import? I believe this is the ./r_libs/bit/libs/ folder (I might be wrong). Currently there is plenty of additional folders installed, such as html, help, Meta, and more.
I have tried several options that R CMD INSTALL --help gives me. The description in https://stat.ethz.ch/R-manual/R-devel/library/utils/html/INSTALL.html tells me to install just the compiled code for another sub-architecture, use --libs-only. However,
R CMD INSTALL --libs-only --library=./r_libs ./external/bit_1.1-12.zip
gives me an error message that there is no ./r_libs/bit/lib directory. The options --no-html, --no-help seem to not do anything.
I am working on a Windows 7 machine using R add-on package installer 3.0.2.
What am I missing here?
Thank you.
I'm unclear about how to install an R package under R/pub in openCPU on my own openCPU server. The openCPU documentation states that package installation is handled by the administrator, but does not give any instructions (that I can find) concerning package installation.
I'm sure I'm missing something obvious but any help with this would be appreciated.
FWIW, I'm attempting to install the ''markdown'' package, which for some reason wasn't installed when calling opencpu-cran.
UPDATE:
I found this link to an example. It calls to the following URL "/Radmin/call/opencpu.demo/install.opencpu/json", but that approach appears not to work based on this SO question. So, if that's not the way to install packages via openCPU, how is it done?
The /R/pub endpoint contains all packages in public R libraries on the system. To install a package, you could ssh into the system, start R as root sudo -i R and then simply use install.packages to install the packages to the global library.
Alternatively, you can install one of the many r-cran-* packages which are available through the ubuntu repositories or cran2deb4ubuntu launchpad, e.g:
sudo apt-get install r-cran-xml