Search code examples
rinstallationbioconductor

Cannot Install GO.db in BiocManager


I've had a quick look through other posts, but couldn't find one with the same errors even though some appear to be somewhat common error messages, so apologies if I did miss a previous thread.

I am trying to install the BioConductor package "GO.db", but keep getting the error message:

> BiocManager::install("GO.db") Bioconductor version 3.8 (BiocManager
> 1.30.4), R 3.5.2 (2018-12-20) Installing package(s) 'GO.db' installing the source package ‘GO.db’
> 
> trying URL
> 'https://bioconductor.org/packages/3.8/data/annotation/src/contrib/GO.db_3.7.0.tar.gz'
> Content type 'application/x-gzip' length 31820876 bytes (30.3 MB)
> downloaded 30.3 MB
> 
> * installing *source* package 'GO.db' ... Warning in file.copy(f, instdir, TRUE) :   problem copying .\NAMESPACE to
> C:\Users\Name\Documents\R\win-library\3.5\GO.db\NAMESPACE: Permission
> denied Warning in file(file, if (append) "a" else "w") :   cannot open
> file 'C:/Users/Name/Documents/R/win-library/3.5/GO.db/DESCRIPTION':
> Permission denied Error in file(file, if (append) "a" else "w") :   
> cannot open the connection ERROR: installing package DESCRIPTION
> failed for package 'GO.db'
> * removing 'C:/Users/Name/Documents/R/win-library/3.5/GO.db' In R CMD INSTALL
> 
> The downloaded source packages are in
>         ‘C:\Users\Name\AppData\Local\Temp\RtmpeYicUm\downloaded_packages’
> installation path not writeable, unable to update packages: class,
> codetools,   Matrix Update old packages: 'assertthat', 'mgcv'

I've tried reinstalling BiocManager, I've kept deleting the directories I've been told to. I've even tried running R as the administrator. But all these attempts garner the same error messages. I've seen a suggestion to use R CMD INSTALL with some command about locking, but since this is a BioConductor package, this solution appears to be unavailable here.


Solution

  • After trying to download the package through several ways, and trying to install from a local file, I still had no luck.

    For reasons unbeknown to me, still, I had to reduce the file protection with my antivirus software. R was already on the list of programs allowed to modify my files, but for whatever reason, it was still being blocked, and only for the instillation of the package GO.db - though I imagine I'll find a few more of these cases in the future.