R install.packages returns failed to create lock directory
On NFS file systems it is sometimes not obvious what things you have to close.
The best way to avoid this is to use the --no-lock
argument on the command line, i.e.:
R CMD INSTALL --no-lock <pkg>
From within R, you can do this from within your command using:
install.packages("Rcpp", dependencies = TRUE, INSTALL_opts = '--no-lock')
Snakemake installing R package in rule environment: error cannot move 00LOCK permission denied
The YAML shown is substandard (incorrect channel order). But more importantly, it generally does not work well to install anything other than Conda packages in Conda-managed R environments. Fortunately, all Bioconductor packages are on the bioconda channel (usually with a bioconductor-
prefix and all lowercase), hence, everything should work perfectly fine with simply:
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- r-base=4.1.1
- r-ggplot2=3.3.5
- bioconductor-ggbio
Why I get Warning in install.packages : cannot remove prior installation of package ‘tibble’Permission restored ‘tibble’?
I also encountered this situation when a package installation went wrong.
This problem occured to others, and there's even a function against this in the pacman
Package Management package :
Sometimes install.packages can "fail so badly that the lock directory is not removed: this inhibits any further installs to the library directory (or for –pkglock, of the package) until the lock directory is removed manually." p_unlock deletes the directory 00LOCK that is left behind.
You can also do it manually : stop all R / RStudio sessions, find the 00LOCK
directory (which might disappear as you close RStudio), and delete it.
This post explains how to avoid the lock.
Related Topics
Read Multiple CSV Files into Separate Data Frames
Conditional Replacement of Values in a Data.Frame
Why Is the Parallel Package Slower Than Just Using Apply
Create a Group Number For Each Consecutive Sequence
Assign Multiple New Variables on Lhs in a Single Line
How Does Predict.Lm() Compute Confidence Interval and Prediction Interval
What Are Replacement Functions in R
Dplyr: Inner_Join With a Partial String Match
Filtering Out Duplicated/Non-Unique Rows in Data.Table
Unique on a Dataframe With Only Selected Columns
Return Elements of List as Independent Objects in Global Environment
Lattice: Multiple Plots in One Window
Custom Sorting (Non-Alphabetical)
Change the Spacing of Tick Marks on the Axis of a Plot