Taylor
Taylor

Reputation: 23

Error in installing 'dplyr' package - has non-zero exit status

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!

Upvotes: 0

Views: 2919

Answers (1)

FrakTool
FrakTool

Reputation: 65

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"

Upvotes: 2

Related Questions