the advantage of the POSIT repo is that there are precompiled R packages for LINUX environments. For this you have to choose the LINUX distribution, in my case RHEL9. Then the repo URL changes to the URL below.
looking at your question again, when you say “did not sync” - are you expecting that Nexus will do something automatically? If so, that isn’t how our proxy repositories are intended to work, Nexus acts as a format aware caching proxy, for caching to occur you’ll need to configure an R client to use Nexus as the remote and download components through it.
OK, I wasn’t aware of that, I had the information from a colleague that the NEXUS downloads the packages and makes them available.
When I try to access from my R client via the NEXUS I get the following error message when downloading an example package A3.
$ /usr/bin/Rscript --slave --no-save --no-restore-history -e 'install.packages("A3", lib="<PATH_TO_USER_LIB>", repos="https://<NEXUS_HOST>/repository/r-proxy")'
Warning: unable to access index for repository https://<NEXUS_HOST>/repository/r-proxy/src/contrib:
cannot open URL 'https://<NEXUS_HOST>/repository/r-proxy/src/contrib/PACKAGES'
Warning message:
package ‘A3’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
I don’t think this is the error, as it occurs for any package. I am using R version 4.4.0 (2024-04-24) – “Puppy Cup”
I have no idea how to debug the issue further. Does anyone have an idea?
$ R --version
R version 4.4.0 (2024-04-24) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
$ /usr/bin/Rscript --slave --no-save --no-restore-history -e 'install.packages("AalenJohansen", lib="<PATH_TO_USER_LIB>", repos="https://<NEXUS_HOST>/repository/r-proxy")'
Warning: unable to access index for repository https://<NEXUS_HOST>/repository/r-proxy/src/contrib:
cannot open URL 'https://<NEXUS_HOST>/repository/r-proxy/src/contrib/PACKAGES'
Warning message:
package ‘AalenJohansen’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
$ /usr/bin/Rscript --slave --no-save --no-restore-history -e 'install.packages("AATtools", lib="<PATH_TO_USER_LIB>", repos="https://<NEXUS_HOST>/repository/r-proxy")'
Warning: unable to access index for repository https://<NEXUS_HOST>/repository/r-proxy/src/contrib:
cannot open URL 'https://<NEXUS_HOST>/repository/r-proxy/src/contrib/PACKAGES'
Warning message:
package ‘AATtools’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
$ /usr/bin/Rscript --slave --no-save --no-restore-history -e 'install.packages("ABACUS", lib="<PATH_TO_USER_LIB>", repos="https://<NEXUS_HOST>/repository/r-proxy")'
Warning: unable to access index for repository https://<NEXUS_HOST>/repository/r-proxy/src/contrib:
cannot open URL 'https://<NEXUS_HOST>/repository/r-proxy/src/contrib/PACKAGES'
Warning message:
package ‘ABACUS’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
We had another problem with a proxy exception. This has now been corrected and /src/contrib/PACKAGES is now available in the NEXUS.
I can also access it via CURL
$ curl https://<NEXUS_HOST>/repository/r-proxy/src/contrib/PACKAGES | head -n 20
Package: A3
Version: 1.0.0
Depends: R (>= 2.15.0), xtable, pbapply
Suggests: randomForest, e1071
NeedsCompilation: no
License: GPL (>= 2)
Package: AalenJohansen
Version: 1.0
Suggests: knitr, rmarkdown
NeedsCompilation: no
License: GPL (>= 2)
Package: AATtools
Version: 0.0.3
Depends: R (>= 3.6.0)
Imports: magrittr, dplyr, doParallel, foreach
NeedsCompilation: no
License: GPL-3
Via Rscript I still get the error message that the URL cannot be accessed.
$ /usr/bin/Rscript --slave --no-save --no-restore-history -e 'install.packages("A3", lib="<PATH_TO_USER_LIB>", repos="https://<NEXUS_HOST>/repository/r-proxy")'
Warning: unable to access index for repository https://<NEXUS_HOST>/repository/r-proxy/src/contrib:
cannot open URL 'https://<NEXUS_HOST>/repository/r-proxy/src/contrib/PACKAGES'
Warning message:
package ‘A3’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
I could imagine that I need to tell Rscript that the correct certificate is being used. But I’m not sure how to tell Rscript to use a specific certificate.