Reputation: 15
I am trying to download a package in an linux-based R session (I also have terminal access). It requires specific C++ dependency but I am unable to find out how to install them.
Since I am behind a company's server, they have restricted our access to the web. And all packages have an artifactory that I have to point to inorder to download packages.
For example: I've been able to set change the repo in this way to install packages from CRAN (I've masked the *** of the website):
r <- getOption("repos")
r["CRAN"] <- "https://***.***.***/artifactory/r-project-cran/"
options(repos = r)
options(download.file.method = "curl")
options(download.file.extra = "--insecure")
But now I am having trouble with a specific dependency that's needed for one of the packages. Specifically the "arrow" package.
For example, I went:
install.packages("arrow", dependencies=TRUE,type="source")
Installing package into ‘/***/***/R’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://***.***.***/artifactory/list/cran-r/src/contrib:
Line starting '{ ...' is malformed!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4662k 100 4662k 0 0 5268k 0 --:--:-- --:--:-- --:--:-- 5262k
* installing *source* package ‘arrow’ ...
** package ‘arrow’ successfully unpacked and MD5 sums checked
** using staged installation
curl: (6) Could not resolve host: github.com
*** Proceeding without C++ dependencies
------------------------- NOTE ---------------------------
There was an issue preparing the Arrow C++ libraries.
See https://arrow.apache.org/docs/r/articles/install.html
---------------------------------------------------------
ERROR: configuration failed for package ‘arrow’
* removing ‘/***/***/R/arrow’
The downloaded source packages are in
‘/tmp/Rtmpu2u1d3/downloaded_packages’
Upvotes: 0
Views: 2333
Reputation: 792
If you can control what version of arrow
is put in your artifactory server, you could prepare a "fat" source package of arrow that includes all C++ dependencies. This is a new utility function that was added in arrow 6.0.0. See https://arrow.apache.org/docs/r/reference/create_package_with_all_dependencies.html for instructions on how to do this.
You could also install official Apache Arrow system packages, as described on https://arrow.apache.org/install/. The downside here is that you have to keep the versions of those libraries and the R package in sync; if you upgrade one without the other, it will not work. https://arrow.apache.org/docs/r/articles/install.html discusses this further.
Upvotes: 1