For the proxy, you can also try Proxyconfig package to help configure the proxy.
When you try to install.packages with default download method you also get the error?
I saw wget in your error message , and on Linux I would have thought that libcurl was used.
I can try the first part of the suggestion on Monday.
I tried to get the proxy settings details, but it seems the admin team does not share it with everyone. Is there any work around for manually copying the package related folder into the server and having R access the packages from the script?
Yes, when I tried install.packages with default download method, I got a warning similar to the one posted but not exactly the same. To troubleshoot this, I created the '.Renviron' file and mentioned to explicitly use 'wget'/'curl' for download. If you need the warning message for 'libcurl', I can share that with you on Monday.
You can download the tar.gz , then upload on the server and install the package using the tar.gz with install.packages and repos=NULL
You can also change the download method in the function call of install.packages. See Method argument
If you have a proxy, it is required that they give you the information to configure your server. Without it, your server is offline. There are some solution for that too bit they required a machine online to ore-download packages and create local CRAN (minicran is one of the solution)
Please find below the output of install.packages, when run with 'libcurl':
> install.packages("mongolite")
Installing package into ‘/.../R-3.5.0/Rpackages’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (download.file(method = "libcurl") is n ot supported on this platform); using local file '/opt/app/workload/deployments/ installables/R-3.5.0/doc/CRAN_mirrors.csv'
Secure CRAN mirrors
1: 0-Cloud [https] 2: Algeria [https]
3: Australia (Canberra) [https] 4: Australia (Melbourne 1) [https]
.
.
.
61: USA (TN) [https] 62: USA (TX 1) [https]
63: Vietnam [https] 64: (other mirrors)
Selection: 61
Warning: unable to access index for repository https://mirrors.nics.utk.edu/cran /src/contrib:
download.file(method = "libcurl") is not supported on this platform
Warning message:
package ‘mongolite’ is not available (for R version 3.5.0)
>
Ok it is the same error. I think you need to find a way to get the proxy configured on your computer to access a cran repo. Either by your admin team directly, or by you if they provide you with the information.
About the cran mirror, I suggest using https://cloud.r-project.org/ (Automatic redirection to servers worldwide) that you can configure in the call of install.packages or using options(repos = c(CRAN = "https://cloud.r-project.org/")) before.
Otherwise, it seems you are working in an offline environment. You can ask your admin team if they can provide with an internal CRAN mirror using linux rsync tool for example. (it is what we have at my place of work)
On the R side, you have minicran that can help you build a local cran mirror with the package you need, on an online computer. Then you transfer this repo to your offline server and connect to this repo for installation.
See the vignette for help on this solution.