On 03/11/15 01:41, Marc Schwartz wrote:> >> On Nov 2, 2015, at 6:00 AM, John Kane <jrkrideau at inbox.com> wrote: >> >> A rather silly question but I went to install a new package this >> morning and as usual a list of CRAN mirrors appeared but the >> Canadian ones had disappeared. >> >> Is this some peculiarity of my system (Ubuntu 14.10 with R version >> 3.2.2) or a new policy for R? >> >> >> John Kane Kingston ON Canada > > > Hi John, > > Presuming that the CRAN mirror list online is current, there do not > appear to be any CRAN mirrors in Canada which support secure HTTP > (HTTPS), which is now the default in 3.2.2. > > See the announcement from August 14 (SIGNIFICANT USER-VISIBLE CHANGES > and NEW FEATURES): > > https://stat.ethz.ch/pipermail/r-announce/2015/000589.html > > See ?chooseCRANmirror for more information. > > When you get a list of mirrors to select, by default the top of the > list will include mirrors that support HTTPS. The last entry on the > list should be (HTTP mirrors). Click that and it will bring up a list > of additional mirrors, including Canadian locations, that support > HTTP.Out of idle curiosity I started playing around with this stuff and ran into a puzzling phenomenon. When I execute chooseCRANmirror() I get an error message:> Error in download.file(url, destfile = f, quiet = TRUE) : > unsupported URL schemeNevertheless a menu appears, with "(HTTP mirrors)" at the bottom, just as you said. I don't understand why chooseCRANmirror() still works despite the error being thrown. Tracing through what chooseCRANmirror() does I reduced the problem to: u <- "https://cran.r-project.org/CRAN_mirrors.csv" download.file(u,destfile="junk") which throws the error> Error in download.file(u, destfile = "junk") : unsupported URL schemeIf I replace the "https" in the url by "http" then things run without an error being thrown. There is no immediate problem for me, since I can install packages from CRAN OK, using my usual New Zealand mirror (which is an http mirror). If I try to use one of the https mirrors that are shown by chooseCRANmirror() (e.g. Austria) then I get a warning:> Warning: unable to access index for repository > https://cran.r-project.org/src/contriband the install goes back to using the New Zealand mirror. So there seems to be something not quite right with my system or with my installation of R. Although, as I said, there is no immediate problem, the fact that something is not quite right worries me. Can you (Marc) or anyone else suggest what might be the problem and how to fix it, or at least track it down a bit more explicitly? Here's my > sessionInfo() R version 3.2.2 (2015-08-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Fedora 17 (Beefy Miracle) locale: [1] LC_CTYPE=en_NZ.utf8 LC_NUMERIC=C [3] LC_TIME=en_NZ.utf8 LC_COLLATE=en_NZ.utf8 [5] LC_MONETARY=en_NZ.utf8 LC_MESSAGES=en_NZ.utf8 [7] LC_PAPER=en_NZ.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_NZ.utf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] misc_0.0-16 loaded via a namespace (and not attached): [1] deldir_0.1-9 Matrix_1.1-4 mgcv_1.8-7 [4] abind_1.4-0 spatstat_1.43-0.007 nlme_3.1-121 [7] grid_3.2.2 polyclip_1.3-1 lattice_0.20-33 [10] goftest_1.0-2 tensor_1.5 Ta. cheers, Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
> On Nov 2, 2015, at 4:36 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote: > > > On 03/11/15 01:41, Marc Schwartz wrote: > >> >>> On Nov 2, 2015, at 6:00 AM, John Kane <jrkrideau at inbox.com> wrote: >>> >>> A rather silly question but I went to install a new package this >>> morning and as usual a list of CRAN mirrors appeared but the >>> Canadian ones had disappeared. >>> >>> Is this some peculiarity of my system (Ubuntu 14.10 with R version >>> 3.2.2) or a new policy for R? >>> >>> >>> John Kane Kingston ON Canada >> >> >> Hi John, >> >> Presuming that the CRAN mirror list online is current, there do not >> appear to be any CRAN mirrors in Canada which support secure HTTP >> (HTTPS), which is now the default in 3.2.2. >> >> See the announcement from August 14 (SIGNIFICANT USER-VISIBLE CHANGES >> and NEW FEATURES): >> >> https://stat.ethz.ch/pipermail/r-announce/2015/000589.html >> >> See ?chooseCRANmirror for more information. >> >> When you get a list of mirrors to select, by default the top of the >> list will include mirrors that support HTTPS. The last entry on the >> list should be (HTTP mirrors). Click that and it will bring up a list >> of additional mirrors, including Canadian locations, that support >> HTTP. > > Out of idle curiosity I started playing around with this stuff and ran into a puzzling phenomenon. > > When I execute > > chooseCRANmirror() > > I get an error message: > >> Error in download.file(url, destfile = f, quiet = TRUE) : >> unsupported URL scheme > > Nevertheless a menu appears, with "(HTTP mirrors)" at the bottom, just as you said. > > I don't understand why chooseCRANmirror() still works despite the error being thrown. > > Tracing through what chooseCRANmirror() does I reduced the problem to: > > u <- "https://cran.r-project.org/CRAN_mirrors.csv" > download.file(u,destfile="junk") > > which throws the error > >> Error in download.file(u, destfile = "junk") : unsupported URL scheme > > If I replace the "https" in the url by "http" then things run without an error being thrown. > > There is no immediate problem for me, since I can install packages from CRAN OK, using my usual New Zealand mirror (which is an http mirror). > > If I try to use one of the https mirrors that are shown by chooseCRANmirror() (e.g. Austria) then I get a warning: > >> Warning: unable to access index for repository >> https://cran.r-project.org/src/contrib > > and the install goes back to using the New Zealand mirror. > > So there seems to be something not quite right with my system or with my installation of R. Although, as I said, there is no immediate problem, the fact that something is not quite right worries me. > > Can you (Marc) or anyone else suggest what might be the problem and how to fix it, or at least track it down a bit more explicitly? > > Here's my<snip>> > > Ta. > > cheers, > > RolfRolf, What do: getOption("CRAN") getOption("repos") show? Is there any chance that you have something set in ~/.Rprofile pertaining to CRAN mirrors or are loading some packages that might conflict? I would try it with a vanilla R session (e.g. 'R --vanilla'). If it works then, there is something getting loaded or set at session start that may be conflicting. Here is my default sessionInfo() when I first start R from the CLI: R version 3.2.2 (2015-08-14) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.1 (El Capitan) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base Regards, Marc
The first error, about 'unsupported scheme' is saying that you (your R) does not have SSL support (as you tracked down, the problem is trying to read the online repositories using https://, and the 'unsupported scheme' is https). The code then goes on and uses the snapshot of mirrors available at the time your R was installed by reading a local file. Your R may be using the 'internal' method (which does not support https) or a libcurl without SSL support. I have> capabilities()["libcurl"] # ok, using libcurllibcurl TRUE and my libcurl supports SSL $ curl-config --features SSL IPv6 libz AsynchDNS IDN NTLM NTLM_WB TLS-SRP I got SSL capability through the package $ dpkg --get-selections |grep libcurl4 libcurl4-openssl-dev:amd64 install Your R might have been compiled without libcurl (depending on how you installed R and the libraries present at installation time), or with a libcurl that does not have SSL. In the mean time, you can quieten things (and live insecurely) with options(useHTTPS=FALSE). There is some discussion in ?download.file for the `method` argument. Martin Morgan ________________________________________ From: R-help [r-help-bounces at r-project.org] on behalf of Marc Schwartz [marc_schwartz at me.com] Sent: Monday, November 02, 2015 6:09 PM To: Rolf Turner Cc: R-help Subject: Re: [R] What happened to Canada?> On Nov 2, 2015, at 4:36 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote: > > > On 03/11/15 01:41, Marc Schwartz wrote: > >> >>> On Nov 2, 2015, at 6:00 AM, John Kane <jrkrideau at inbox.com> wrote: >>> >>> A rather silly question but I went to install a new package this >>> morning and as usual a list of CRAN mirrors appeared but the >>> Canadian ones had disappeared. >>> >>> Is this some peculiarity of my system (Ubuntu 14.10 with R version >>> 3.2.2) or a new policy for R? >>> >>> >>> John Kane Kingston ON Canada >> >> >> Hi John, >> >> Presuming that the CRAN mirror list online is current, there do not >> appear to be any CRAN mirrors in Canada which support secure HTTP >> (HTTPS), which is now the default in 3.2.2. >> >> See the announcement from August 14 (SIGNIFICANT USER-VISIBLE CHANGES >> and NEW FEATURES): >> >> https://stat.ethz.ch/pipermail/r-announce/2015/000589.html >> >> See ?chooseCRANmirror for more information. >> >> When you get a list of mirrors to select, by default the top of the >> list will include mirrors that support HTTPS. The last entry on the >> list should be (HTTP mirrors). Click that and it will bring up a list >> of additional mirrors, including Canadian locations, that support >> HTTP. > > Out of idle curiosity I started playing around with this stuff and ran into a puzzling phenomenon. > > When I execute > > chooseCRANmirror() > > I get an error message: > >> Error in download.file(url, destfile = f, quiet = TRUE) : >> unsupported URL scheme > > Nevertheless a menu appears, with "(HTTP mirrors)" at the bottom, just as you said. > > I don't understand why chooseCRANmirror() still works despite the error being thrown. > > Tracing through what chooseCRANmirror() does I reduced the problem to: > > u <- "https://cran.r-project.org/CRAN_mirrors.csv" > download.file(u,destfile="junk") > > which throws the error > >> Error in download.file(u, destfile = "junk") : unsupported URL scheme > > If I replace the "https" in the url by "http" then things run without an error being thrown. > > There is no immediate problem for me, since I can install packages from CRAN OK, using my usual New Zealand mirror (which is an http mirror). > > If I try to use one of the https mirrors that are shown by chooseCRANmirror() (e.g. Austria) then I get a warning: > >> Warning: unable to access index for repository >> https://cran.r-project.org/src/contrib > > and the install goes back to using the New Zealand mirror. > > So there seems to be something not quite right with my system or with my installation of R. Although, as I said, there is no immediate problem, the fact that something is not quite right worries me. > > Can you (Marc) or anyone else suggest what might be the problem and how to fix it, or at least track it down a bit more explicitly? > > Here's my<snip>> > > Ta. > > cheers, > > RolfRolf, What do: getOption("CRAN") getOption("repos") show? Is there any chance that you have something set in ~/.Rprofile pertaining to CRAN mirrors or are loading some packages that might conflict? I would try it with a vanilla R session (e.g. 'R --vanilla'). If it works then, there is something getting loaded or set at session start that may be conflicting. Here is my default sessionInfo() when I first start R from the CLI: R version 3.2.2 (2015-08-14) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.1 (El Capitan) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base Regards, Marc ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.
Thanks for the reply, Marc. On 03/11/15 12:09, Marc Schwartz wrote: <SNIP>> > Rolf, > > What do: > > getOption("CRAN") > > getOption("repos") > > show?The first shows "NULL", the second shows> "http://cran.stat.auckland.ac.nz"> Is there any chance that you have something set in ~/.Rprofile > pertaining to CRAN mirrors or are loading some packages that might conflict?Indeed. I have "repos" set (as seen above) in my .Rprofile.> I would try it with a vanilla R session (e.g. 'R --vanilla').I had already tried "R --vanilla" and got the same effect. I.e. I got the same error from chooseCRANmirror() but nevertheless the menu appeared, just as before. This time, at your prompting, I tried to install a package under "R --vanilla":> install.packages("circular",lib="/home/rolf/Rlib")I got the following warning message(s):> Warning: unable to access index for repository > https://cran.r-project.org/src/contrib > Warning message: > package ?circular? is not available (for R version 3.2.2)(That last warning is certainly not true.) Note that this was *after* having chosen the Austria mirror from the menu presented by chooseCRANmirror(). Before running chooseCRANmirror(), getOption("repos") produced:> CRAN > "@CRAN@"After running chooseCRANmirror(), getOption("repos") produced:> CRAN > "https://cran.r-project.org"> If it works then, there is something getting loaded or set at session > start that may be conflicting.Well, it *doesn't* work, so setting "repos" in my .Rprofile was not the problem, or at least not the essence of the problem. Any other ideas? Ta. cheers, Rolf -- Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276