[Bioc-devel] error from biocLite on OSX with R-devel / Bioc-devel

Martin Morgan martin.morgan at roswellpark.org
Thu Feb 2 00:53:25 CET 2017


On 02/01/2017 01:11 PM, Kevin Ushey wrote:
> Although installation succeeds for me (macOS Sierra with recent R-devel), I
> see the following output in an interactive session when I try to install
> the lazyeval package:
>
>> install.packages('lazyeval', repos = BiocInstaller:::biocinstallRepos())
> Installing package into '/Users/kevin/r/r-devel-sanitizers/library'
> (as 'lib' is unspecified)
> curl: (22) The requested URL returned error: 404 Not Found
> Warning in gzfile(file, "rb") :
>   cannot open compressed file
> '/var/folders/tm/5dt8p5s50x58br1k6wpqnwx00000gn/T//RtmpyHUICQ/repos_https%3A%2F%2Fbioconductor.org%2Fpackages%2F3.5%2Fbioc%2Fsrc%2Fcontrib.rds',
> probable reason 'No such file or directory'
> curl: (22) The requested URL returned error: 404 Not Found
> Warning in gzfile(file, "rb") :
>   cannot open compressed file
> '/var/folders/tm/5dt8p5s50x58br1k6wpqnwx00000gn/T//RtmpyHUICQ/repos_https%3A%2F%2Fbioconductor.org%2Fpackages%2F3.5%2Fdata%2Fannotation%2Fsrc%2Fcontrib.rds',
> probable reason 'No such file or directory'
> curl: (22) The requested URL returned error: 404 Not Found
> Warning in gzfile(file, "rb") :
>   cannot open compressed file
> '/var/folders/tm/5dt8p5s50x58br1k6wpqnwx00000gn/T//RtmpyHUICQ/repos_https%3A%2F%2Fbioconductor.org%2Fpackages%2F3.5%2Fdata%2Fexperiment%2Fsrc%2Fcontrib.rds',
> probable reason 'No such file or directory'
> curl: (22) The requested URL returned error: 404 Not Found
> Warning in gzfile(file, "rb") :
>   cannot open compressed file
> '/var/folders/tm/5dt8p5s50x58br1k6wpqnwx00000gn/T//RtmpyHUICQ/repos_https%3A%2F%2Fbioconductor.org%2Fpackages%2F3.5%2Fextra%2Fsrc%2Fcontrib.rds',
> probable reason 'No such file or directory'
>
>
> Bizarrely, I don't see this in a non-interactive session; that is, this
> works fine:
>
> R -e "install.packages('lazyeval', repos =
> BiocInstaller:::biocinstallRepos())"

In Levi's case, what happens is in a call to available.packages(), for this

     repos <- 
"https://cran.rstudio.com/bin/macosx/mavericks/contrib/3.4.rds"
     dest <- file.path(tempdir(), paste0("repos_", URLencode(repos,
                 TRUE), ".rds"))

'dest' is meant to be a local cache of 'repos'. R checks to see if dest 
exists. If it does, then R says

     readRDS(dest)

but if it doesn't it tries

     z <- tryCatch(download.file(repos, dest=dest), error=identity)

The first time through, dest doesn't exist, so R tries to download the 
file. This fails (because the 'repos' url doesn't exist) and subsequent 
R code recovers from the failure.

Unfortunately, the failed download.file() creates a 0-length file, so 
the next time through 'dest' exists as a file on disk, so R tries to 
readRDS(dest), and fails.

A workaround is actually to take Kevin's approach, and use a method 
different from the default 'libcurl' for the download.

I believe, a little ironically, that this is actually at least partly my 
fault in base R, and will fix this upstream.

Martin

>
>
> For reference, I'm using 'curl' for downloads:
>
>> options("download.file.method", "download.file.extra")
> $download.file.method
> [1] "curl"
>
> $download.file.extra
> [1] "-L -f --stderr -"
>
>
> And the version of R I'm using:
>
> R Under development (unstable) (2017-01-24 r72026)
> Platform: x86_64-apple-darwin16.3.0 (64-bit)
> Running under: macOS Sierra 10.12.3
>
>
> I don't see the aforementioned warnings with R 3.3.2.
>
> Best,
> Kevin
>
> On Wed, Feb 1, 2017 at 4:26 AM, Vincent Carey <stvjc at channing.harvard.edu>
> wrote:
>
>> i did not mean to implicate biocLite ... i am being too terse.  i mention
>> it because, after so many
>> years of biocLite being spectacularly reliable ... persistence of a problem
>> with its performance
>> implies a serious upstream problem that would be very nice to eradicate ...
>>
>> On Wed, Feb 1, 2017 at 1:15 AM, Levi Waldron <lwaldron.research at gmail.com>
>> wrote:
>>
>>>
>>> On Wed, Feb 1, 2017 at 12:51 AM, Martin Morgan <
>>> martin.morgan at roswellpark.org> wrote:
>>>
>>>> Levi triggered the problem with install.packages("lazyeval",
>>>> repos=biocinstallRepos(), which is an R-only command. Also, there have
>> not
>>>> been any changes to the logic of biocLite() in this regard, so the
>> problem
>>>> is likely to be in R (devel) per se. I'll try to get access to a Mac and
>>>> investigate.
>>>
>>>
>>> Yes, in fact, now I notice that it also happens with just
>>> install.packages("lazyeval"), on the second invocation with the same repo
>>> argument (although exiting and starting R again creates a new tmp
>> directory
>>> so gives another free invocation. Sorry for blaming it on biocLite().
>>>
>>> --
>>> Levi Waldron
>>> http://www.waldronlab.org
>>> Assistant Professor of Biostatistics     CUNY School of Public Health
>>> US: +1 646-364-9616 <(646)%20364-9616>
>>>        Skype: levi.waldron
>>>
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>


This email message may contain legally privileged and/or...{{dropped:2}}



More information about the Bioc-devel mailing list