Couldn’t delete a failed R package installation
Today I faced a strange thing, while I tried to install an update to one of my R-packages. As usually, I installed the latest version from it like this
library("devtools")
install_github("fischuu/GenomicTools")
But the installation failed, and when I tried to reinstall it, I got this error message:
Installing package into ‘/homeappl/home/<user>/R/x86_64-redhat-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
ERROR: failed to lock directory ‘/homeappl/home/<user>/R/x86_64-redhat-linux-gnu-library/4.1’ for modifying
Try removing ‘/homeappl/home/<user>/R/x86_64-redhat-linux-gnu-library/4.1/00LOCK-GenomicTools’
Warning message:
In i.p(...) :
installation of package ‘/tmp/Rtmp<...>Lv/file3c36<...>34/GenomicTools_0.2.11.tar.gz’ had non-zero exit status
So, I tried to go in said directory and delete the folder manually and there I received another error:
rm: cannot remove '00LOCK-GenomicTools/GenomicTools/libs/.nfs00000001002e2<...>d': Device or resource busy
I tried this and this, but nothing helped to delete that folder, it kept mocking my that the device is busy. Eventually, it helped just to rename the folder list this
mv 00LOCK-GenomicTools/ 00LOCK-GenomicTools-deleteThis/
It is now still hanging there in the folder, but I was able to reinstall the R-package and now I need to revisit the folder in a few days and check, if the device is still busy or if I can delete it then…