0

When I invoke

install.packages("dplyr")

this is what shows up:

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2019-07-05/src/contrib/dplyr_0.8.3.tar.gz'
Content type 'application/octet-stream' length 1173098 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

ERROR: failed to lock directory ‘/usr/local/lib/R/site-library’ for modifying
Try removing ‘/usr/local/lib/R/site-library/00LOCK-dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpDn3GWa/downloaded_packages’

It also looks like this dplyr package is no longer in my User Library.

Please help! Other installation of packages seem to be working fine. I have no idea what's going on because I have always had no issues with this package until today and I desperately need this for my final next week.

Thanks!

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
Taylor
  • 13
  • 1
  • 6
  • 2
    **Try removing ‘/usr/local/lib/R/site-library/00LOCK-dplyr’** Go to `R_HOME` and delete that folder(00LOCK-dplyr). Restart R, reinstall with all deps set to TRUE – NelsonGon May 09 '20 at 02:56

1 Answers1

2

All of what i'm posting here is provinient on the link, post here for resume:

install.packages("Rcpp", dependencies = TRUE, INSTALL_opts = '--no-lock')

Why this happens ?

This happens when your last package installation has interrupted abnormally. to fix this you should remove the locked file. For example Execute this command in R console:

unlink("/home/me/src/Rlibs/00LOCK-Rcpp", recursive = TRUE)

R install.packages returns "failed to create lock directory"

FrakTool
  • 65
  • 1
  • 15