rwindowspackagerstudiobioconductor

BioManager update issues at the moment to update in RStudio


I've been trying to update my BioManager since it is out-of-date, but at the moment to run the command in RStudio:

BiocManager::install()

I'm receiving the next message problem:

Error in unpackPkgZip(foundpkgs[okp, 2L], foundpkgs[okp, 1L], lib, libs_only,:
ERROR: failed to lock directory ‘C:\Users\user\AppData\Local\R\win-library\4.2’ 
for modifying Try removing ‘C:\Users\user\AppData\Local\R\win-library\4.2/00LOCK’

I followed the instructions and removing the C:\Users\user\AppData\Local\R\win-library\4.2/00LOCK and running again, but the same installation is creating again the directory '00LOCK'

Reading other post, the recommendation is run RStudio as administrator, which also did... I checked also the permissions on the directory 'C:\Users\user\AppData\Local\R\win-library\4.2' and seems to be ok.

Any other recommendation? I will appreciate it. Thank you!


Solution

  • Reading the documentation about R and the package, it is creating a lock by default.

    Before to install BiocManager it is necessary add next parameter:

    options("install.lock"=FALSE)
    

    Once you add that command, the installation will be running without problem:

    if (!require("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
    BiocManager::install()