Installation

R Project: How to install packages when server is not connected to the internet.

krwinters11
Path Finder

I have a server that is not connected to the internet. I need to install packages on my R Project app on the server. I have moved them into the library (downloaded them on another computer), but the app in splunk doesn't recognize them. Any tricks to this? Regards.

0 Karma
1 Solution

rfujara_splunk
Splunk Employee
Splunk Employee

At the moment, that is not supported by the app.

However, when executing R as part of a Splunk search, the default R library (the folder where additional packages are installed to) is not used. The actual library path is depends on your OS and version.

I added an Issue on R Project GitHub page and already implemented some code.

Before publishing a new version, I would like to test the changes with some packages. Which package are you trying to install?

View solution in original post

rfujara_splunk
Splunk Employee
Splunk Employee

At the moment, that is not supported by the app.

However, when executing R as part of a Splunk search, the default R library (the folder where additional packages are installed to) is not used. The actual library path is depends on your OS and version.

I added an Issue on R Project GitHub page and already implemented some code.

Before publishing a new version, I would like to test the changes with some packages. Which package are you trying to install?

krwinters11
Path Finder

We are trying to install forecast. Thank you for your help

0 Karma

rfujara_splunk
Splunk Employee
Splunk Employee

I just tried installing the forecast without internet access from the Splunk server.

To do that, I installed the latest version of the R app which allows "uploading" packages (downloaded from CRAN).

So I downloaded the forecast package from CRAN an uploaded it to the R app and triggered installing all not yet installed packages using the R search command from within the search app.

That gave me an error message saying it's missing another package. After uploading that, it said it missing another package and so on ... at the end it found out that the forecast package depends on the following packages:

zoo
timeDate
tseries
quadprog
fracdiff
Rcpp
colorspace

After downloading each of them from CRAN and uploading each to the R app, the installation of the forecast package worked (without having internet access from the Splunk server).

krwinters11
Path Finder

I am getting this error when clicking the "Install now" button:
Cannot install package 'zoo'. Unable to install package 'zoo': Warning in unzip(zipname, exdir = dest) : internal error in 'unz' code
Warning in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open compressed file 'zoo/DESCRIPTION', probable reason 'No such file or directory'
Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open the connection

I need to upload the zip file, correct?

0 Karma

rfujara_splunk
Splunk Employee
Splunk Employee

Correct, just upload all of the packages: forecast plus the other 7 packages I mentioned above. Then click on the "Samples" page to trigger installation of each of them.

0 Karma

krwinters11
Path Finder

I don't have a "Samples" page. I clicked the "Install now" button on the "Packages" page. After I click that button though, it says "Installation Error" beside the package. It has done this for all the packages I have tried. Any ideas?

0 Karma

krwinters11
Path Finder

and I get this error when I try to run a search out of the examples page:

command="r", Cannot install package 'colorspace'. Unable to install package 'colorspace': Warning in unzip(zipname, exdir = dest) : internal error in 'unz' code Warning in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : cannot open compressed file 'colorspace/DESCRIPTION', probable reason 'No such file or directory' Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : cannot open the connection

0 Karma

krwinters11
Path Finder

I have the DESCRIPTION file, so I'm not sure why it isn't working. It seems like it is so straight forward, I don't know what is wrong. thank you for your help!

0 Karma

rfujara_splunk
Splunk Employee
Splunk Employee

That sounds bad. If you want we can do a WebEx session. If you are interested, let's schedule a time by email (rfujara@splunk.com).

0 Karma

krwinters11
Path Finder

That would be great. I sent an email.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...