Feature #1116
Mis à jour par Matthieu Decorde il y a plus de 10 ans
During the Linux an d Mac installations R cannot access internet to install the R packages
h3. Solution 0
Configure R proxy in the .RProfile or .Renviron files
h3. 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
* R packages installation with the "install.packages" R function
h3. Solution 2
* 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
* 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: 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
NOTE: Linux "export" and Windows "set" command create the variable in the local session scope, they are not permanently stored.
h3. The chosen solution
Windows: no package installed
Linux: force the use of wget
MacOSX: use the "GetProxyConfiguration.jar" to set the right proxy configuration when launching R.
h3. Test Validation
Windows: ok
Linux:
MacOSX:
h3. Solution 0
Configure R proxy in the .RProfile or .Renviron files
h3. 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
* R packages installation with the "install.packages" R function
h3. Solution 2
* 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
* 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: 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
NOTE: Linux "export" and Windows "set" command create the variable in the local session scope, they are not permanently stored.
h3. The chosen solution
Windows: no package installed
Linux: force the use of wget
MacOSX: use the "GetProxyConfiguration.jar" to set the right proxy configuration when launching R.
h3. Test Validation
Windows: ok
Linux:
MacOSX: