0

I updated my R (version 3.4.1) and when I try to install any package I have this error message (I'm using Rstudio and linux mint 18.1):

> Warning in install.packages :

'lib = "/usr/local/lib/R/site-library"' is not writable

Would you like to use a personal library instead?  (y/n) y

Would you like to create a personal library

NA

to install packages into?  (y/n) y

Error in install.packages : unable to create ‘NA’

My issue problably is the same issue here (R 3.4.1 "Single Candle" Personal Library Path Error: unable to create ‘NA’). And @Phil answer looks really good (https://stackoverflow.com/a/44903158/8256146). But I also wondering if I can resolve this issue using:

cd /usr/local/lib/R

sudo chmod o+w site-library

ls -l

The printed line should look like this: drwxrwsrwx 2 root staff 0000 Mar 31 00:00 site-library"

I found that answer above here (https://stackoverflow.com/a/36696488/8256146) and as I'm new on Linux mint world I'm wondering if this is similar from what @Phil proposed or would have a different performance. I don't have a group (using Linux mint 18.1) so I don't know how to proceede with @Phil answer. I have just one user (me) and my account type status is Administrator.

BMT
  • 65
  • 6
  • `chmod o+w` gives write permission to the folder to anyone who uses your machine. If you're the only person using your machine it's probably fine. An alternative would be to just assign yourself as the owner: `sudo chown username -R R/` (obviously replacing `username` with your user name) – Phil Jul 05 '17 at 13:54
  • Try to run it as an admenistration –  Jul 05 '17 at 14:59
  • Thanks, @Phil and @Alice for your quick reply. Initially, I tried only `sudo chown -R R/` and didn't work. But then I `cd /usr/local/lib ` and `sudo chown -R R/ ` and worked just fine! – BMT Jul 05 '17 at 17:48

0 Answers0