Recently I updated my R from 3.6.3 to 4.0.5. I can install packages by BiocManager::install() while I was using R 3.6.3. However, I cannot install packages by BiocManager::install() while I am using R 4.0.5. I can install packages such as ggplot2 by install.packages("ggplot2") in R 4.0.5. I don't know why BiocManager::install() didn't work in my computer for R 4.0.5. Please see the error message below. Thank you!
> if (!requireNamespace("BiocManager", quietly = TRUE))
+ install.packages("BiocManager")
>
> BiocManager::install("sva")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cran.rstudio.com/
Bioconductor version 3.12 (BiocManager 1.30.13), R 4.0.5 (2021-03-31)
Installing package(s) 'BiocVersion', 'sva'
also installing the dependency ‘genefilter’
Error in readRDS(dest) : error reading from connection
I am having the same issue and have tried reinstalling R multiple times (4.0.5 and 3.6.3) and have consistently ran into this issue. I specifically had the issue when trying to install BSgenome, but have also found that I can't install IRanges anymore even though I was able to install that package a few days ago without any errors.
A problem has been identified in BiocManager 1.30.13. Please do the following:
now use BiocManager in the customary way. Let us know how it goes.
This fixed my issue. Thanks so much!
Hi I am still having the same issue after running your above suggestion. Any thoughts? I just upgraded to R 4.0.5 on a Mac M1
replacement repositories: CRAN: https://cran.rstudio.com/
Bioconductor version 3.12 (BiocManager 1.30.13), R 4.0.5 (2021-03-31) Installing package(s) 'phyloseq' also installing the dependencies ‘hms’, ‘Rhdf5lib’, ‘rhdf5filters’, ‘zlibbioc’, ‘pixmap’, ‘sp’, ‘progress’, ‘rhdf5’, ‘S4Vectors’, ‘IRanges’, ‘XVector’, ‘iterators’, ‘ade4’, ‘ape’, ‘Biobase’, ‘BiocGenerics’, ‘biomformat’, ‘Biostrings’, ‘data.table’, ‘foreach’, ‘igraph’, ‘multtest’, ‘plyr’, ‘reshape2’
Error in readRDS(dest) : error reading from connection
Hi Rachel -- you will have to restart R. You need to see BiocManager 1.30.13.1 -- in the above I only see 1.30.13, so try again with
devtools::install_github("Bioconductor/BiocManager", ref="ghost-binary-repo")
and then start R again and try the phyloseq installationIt helps! Thank you!
Thank you very much, it works, I was loosing my mind already.
On executing the above code:
I get the following error: WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/. Downloading GitHub repo Bioconductor/BiocManager@ghost-binary-repo Error in utils::download.file(url, path, method = method, quiet = quiet, : cannot open URL 'https://api.github.com/repos/Bioconductor/BiocManager/tarball/ghost-binary-repo' In addition: Warning message: Not a validObject(): no slot of name "elementType" for this object of class "GRanges"
How do I resolve it ? Please help.
I restarted the R. I ran R as administrator. I choose another mirror. While the error is still there. I have another computer. I also updated the R from 3.6.3 to 4.0.5. The R version, mirror, the location of the R library are all the same between the two computers. However, the other computer didn't have this error.
Thanks so much for posting this! Have been going crazy all afternoon trying to install a package!