I had installed RStudio 0.97.168 on Ubuntu 12.04. When I try to install gstat library I get the below error
install.packages("gstat", dependencies=TRUE)
Warning in install.packages :
cannot open: HTTP status was '407 Proxy Authentication Required'
Warning in install.packages :
cannot open: HTTP status was '407 Proxy Authentication Required'
Warning in install.packages :
unable to access index for repository http://software.rc.fas.harvard.edu/mirrors/R/src/contrib
Warning in install.packages :
package ‘gstat’ is not available (for R version 2.14.1)
I saw solutions like --intenet and setInternet(TRUE) which are only applicable for Windows OS.
Please provide help on changes I need to make to get behind my university proxy?
You should be able to use the following in your R session:
Sys.setenv(http_proxy="http://user:[email protected]:8080/")
(Obviously, replace with your username, password, proxy server, and port.)
It's important that this is done before you first try to download anything--in other words, done preferably at the start of an R session. From the help page at ?download.file:
These environment variables must be set before the download code is first used: they cannot be altered later by calling Sys.setenv.
There are ways to make this change "permanent" too, but that might be inconvenient if you are working on a laptop or working with multiple internet connections, some of which requires access via a proxy server, and some which don't.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With