Feature #1116

Updated by Matthieu Decorde over 5 years ago

During the Linux an d Mac installations R cannot access internet to install the if there is a proxy during TXM installation (Linux + Mac OS X) -> R packages configuration

h3. Solution 0
Configure
*Hypothesis1*:
R proxy in configuration depends on the .RProfile or .Renviron files Operating System:
* Windows: R uses the "--internet2" option
* Mac OS X/Linux: R uses the "http_proxy" environment variable


h3. Solution1

- For Windows: the "--internet2" option can be added automatically. see: http://cran.r-project.org/bin/windows/base/rw-FAQ.html#The-Internet-download-functions-fail_002e
- For Mac OS X and Linux, we have to test the "http_proxy" R env variable is used

*Setup: solution1* :
*
Embed R in all setups and provide the exact libraries for this version of R -> solve R packages installation but not "Check R packages" command

h3. Solution 2

*Setup: solution2*:
* Windows: run R with "--internet2" argument
* Debian/Ubuntu: R automatically uses the "http_proxy" which is normally generated by the network manager. It means there is nothing more to do than running R et install the packages as with direct connection. But we may still test if "http_proxy" exists and do "something" if the variable doesn't exist because the tests have only been made on Ubuntu.
* Mac OS X Mavericks: Network manager does not create "http_proxy" environment variable so we need to create it once. The proxies settings can be retrieved using "networksetup -getwebproxy <Network service>" then we can create the variable before running R with "export" or in R with Sys.setenv().

[SJ] It appears there is no easy cross-platform solution therefore the solution 1 seems to be the better one.

h3. Solution 3

*Setup: solution 3* :
* see R options download.file.method = "wget" or "lynx" or install.packages(method = "wget"). wget seems to use the OS network configuration rather than the R network configuration.
The problem is under Mac OS X and Windows "wget" is not installed by default.
The method depends on the OS :
* Linux: wget
* Mac OS X : curl
* Windows : no need to install packages

NOTE: For Windows:


*Setup/TXM RCP: solution 4* :
* use .RProfile or .Renviron files to configure
the "--internet2" option can be added automatically. see: http://cran.r-project.org/bin/windows/base/rw-FAQ.html#The-Internet-download-functions-fail_002e
R network

NOTE: Linux "export" and Windows "set" command create the variable in the local session scope, they are not permanently stored.

Back