Failed to install a package from Bioconductor and the library location not writable
1
0
Entering edit mode
22 months ago
mohsamir2016 ▴ 30

I am trying to install a bioconductor package (XVector). Bioconductor version is 3.16, and the package is available for it as the link is confirming that (https://bioconductor.org/packages/release/bioc/html/XVector.html)

BiocManager::install("XVector")

but it pops an error:

Warning: unable to access index for repository https://bioconductor.org/packages/3.16/bioc/src/contrib:
  cannot open URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/PACKAGES'
Installation paths not writeable, unable to update packages
  Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.2/library
  packages:
    boot, foreign, Matrix, nlme, survival
Warning message:
package ‘XVector’ is not available for Bioconductor version '3.16'

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

In my library, I have two paths:

.libPaths()
[1] "C:/R"                               "C:/Program Files/R/R-4.2.2/library"

By default my library location is C:/R, which I created on my own and there I was able to install some other packages normally. I also edited the variable name (R_LIBS_USER) and value (C:/R), and edited them to be for the first directory

How can I delete the C/program file location? I observed that R are not able to load the libraries in that user-created folder and tends to reinstall it in the C/program file? But why? The solution would be to delete the C/program location and force R to only install and load libraries in my folder.

Any suggestions?

Bioconductor RNA-seq R • 3.7k views
ADD COMMENT
0
Entering edit mode
22 months ago
Ram 44k

What does BiocManager::version() say? Also, you don't need to remove any entry from .libPaths(), you can simply use the lib.loc argument in both install.packages and BiocManager::install to specify a custom lib path. Plus, given that C:/R is the first lib path, removing the second will probably have no effect. I think you have a version conflict.

ADD COMMENT

Login before adding your answer.

Traffic: 1913 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6