Permission denied for installing IlluminaHumanMethylation package




I wanted to install the IlluminaHumanMethylationEPICanno.ilm10b2.hg19 package(wateRmelon) of Bioconductor so i can use the readEPIC function for reading my data (.idat files). But i keep getting this error:

> BiocManager::install('IlluminaHumanMethylationEPICanno.ilm10b2.hg19',update=F)
Bioconductor version 3.7 (BiocManager 1.30.3), R 3.5.1 (2018-07-02)
Installing package(s) 'IlluminaHumanMethylationEPICanno.ilm10b2.hg19'
installing the source package ‘IlluminaHumanMethylationEPICanno.ilm10b2.hg19’

trying URL ''
Content type 'application/x-gzip' length 158636019 bytes (151.3 MB)
downloaded 151.3 MB

* installing *source* package 'IlluminaHumanMethylationEPICanno.ilm10b2.hg19' ...
** data
*** moving datasets to lazyload DB
Error in lazyLoadDBinsertVariable(vars[i], from, datafile, ascii, compress,  : 
  cannot open file 'C:/Users/bianc/OneDrive/Documenten/R/win-library/3.5/IlluminaHumanMethylationEPICanno.ilm10b2.hg19/data/Rdata.rdb': Permission denied
ERROR: lazydata failed for package 'IlluminaHumanMethylationEPICanno.ilm10b2.hg19'
* removing 'C:/Users/bianc/OneDrive/Documenten/R/win-library/3.5/IlluminaHumanMethylationEPICanno.ilm10b2.hg19'

The downloaded source packages are in
Warning message:
In install.packages(pkgs = doing, lib = lib, repos = repos, ...) :
  installation of package ‘IlluminaHumanMethylationEPICanno.ilm10b2.hg19’ had non-zero exit status

Does anyone know how to solve this?
Thank you!


It looks like it does not have permissions to read from this directory: C:/Users/bianc/OneDrive/Documenten/R/win-library/3.5/

Can you access it through Windows Explorer?


Yes, i can access it. All my other packages are installed in that folder, only this particular package gives problems


The fact that it's one OneDrive is suspicious -- you might be running into an issue wherein RStudio and Windows are competing for file access, and if Windows has locked the file when R attempts to use it, that file access attempt can fail.

Do you have any better luck if you use a local, non-OneDrive library path?


It did!
Thank you very much!! Wasted hours on this problem haha


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.