0

I know it's a current question regarding the number of topics about this issue. However, I didn't find a suitable answer on the website. I'm a beginner on Linux, and while installing packages on R, I sometimes meet this problem. Here is my code:

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/Rvcg_0.19.1.tar.gz'
Content type 'application/x-gzip' length 1934965 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

ERROR: failed to lock directory ‘/usr/local/lib/R/site-library’ for modifying
Try removing ‘/usr/local/lib/R/site-library/00LOCK-Rvcg’

The downloaded source packages are in
    ‘/tmp/RtmpKAVwlV/downloaded_packages’
Warning message:
In install.packages("Rvcg") :
  installation of package ‘Rvcg’ had non-zero exit status

My version of Linux is Linux Mint 20.

Thanks for your help

  • 1
    Did you try what was suggestet? E.g. sudo rm /usr/local/... ? Also, look into this thread: https://stackoverflow.com/questions/14382209/r-install-packages-returns-failed-to-create-lock-directory – MKR Oct 09 '20 at 14:12
  • Thanks a lot for your help. I had to remove my lib/R and install packages again. Now everything works! – Oirakul Oct 13 '20 at 20:10

0 Answers0