2

When trying to install bioconductor (for installing phyloseq package) I get several warning and error messages

I got a new harddrive few days ago so I had to reinstall all programs including R with all the packages I usally need. Everything worked fine until I tried bioconductor.

I am using the rcommended code which worked out for me before: source('http://bioconductor.org/biocLite.R') biocLite('phyloseq')

The error message I get is:

Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.6.0 (2019-04-26). installation path not writeable, unable to update packages: cluster, nlme Updating packages 'bipartite' Warning: unable to access index for repository https://bioconductor.org/packages/3.7/bioc/bin/windows/contrib/3.6:
cannot open URL 'https://bioconductor.org/packages/3.7/bioc/bin/windows/contrib/3.6/PACKAGES

So apparently there are several problems?

  1. Some packages cant be updated due to wrong libpath and
  2. R is not able the open the bioconductor hompage

Thanks for your suggestions!

Theo
  • 57,719
  • 8
  • 24
  • 41
Barbs
  • 21
  • 1
  • 2
  • See https://stackoverflow.com/questions/41839214/installation-path-not-writable-r-unable-to-update-packages for the " installation path not writeable" issue – CodeNoob May 24 '19 at 15:13

1 Answers1

1

Bioconductor is tied to particular versions of R. You're trying to use a version of Bioconductor (3.7) on a version of R (3.6) that does not match. There is a map between versions, but the underlying problem is that you're using your R-3.5 libraries hoping that they'll work in R-3.6. You should instead 'start over' with an R-3.6 specific installation. In addition, 'BiocInstaller' has been replaced with BiocManager; your 'recommended code' is out of date, as shown on package landing pages.

If you want to continue using your previous library installation (note that this is a one-way street -- you're giving up on your usable R-3.5 installation), try removing ALL versions of the BiocVersion and BiocInstaller packages. .

remove.packages(c("BiocVersion", "BiocInstaller")) # repeat 'till all removed

Either starting with a new library or after removing previous versions of BiocVersion / BiocInstaller, install BiocManager from CRAN

install.packages("BiocManager")

and go about your business

BiocManager::install("phyloseq")

Make sure to validate your installation, so that you do not mix packages from different Bioconductor versions

BiocManager::valid()

Check out current package landing pages, e.g., for phyloseq, or the installation page.

Martin Morgan
  • 45,935
  • 7
  • 84
  • 112
  • Thanks a lot for your suggestions! I removed all BiocVersion and BioInstaller as you suggested. Then I tried: ´install.packages("BiocManager")´ # Which gives me a warning message Warning in install.packages: 'lib = "C:/Program Files/R/R-3.6.0/library"' is not writable Error in install.packages : unable to install packages Somehow I seem to have two libpaths: ´libPaths()´ [1] "C:/Users/Barbara/Documents/R/win-library/3.6" "C:/Program Files/R/R-3.6.0/library" Would it help to delete the 'older' path? I dont know where this is coming from, I guess from a previous installation... – Barbs May 27 '19 at 07:58
  • I think you have a BiocVersion installed in the `c:/Program Files` path, and that R is trying to update this version. You need to remove this version as administrator (and then use `BiocManager()` as a regular user. – Martin Morgan May 28 '19 at 17:28
  • Thanks a lot for your help. I removed the wrong version and installed all packages new. Its perfectly running now! – Barbs Jun 03 '19 at 07:54