I had R working perfectly until I decided to upgrade to 3.4. Now I am unable to install packages.
while installing packages I get an error
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages("ggplot2") :
'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead? (y/n)
If I hit yes I get
Would you like to create a personal library
NA
to install packages into? (y/n)
at which point it proceeds give this error
Error in install.packages("quantstrat") : unable to create ‘NA’
I don't know why R 3.4.1 changes the library path. To change it back, simply edit /etc/R/Renviron:
$ sudo gedit /etc/R/Renviron
Comment-out R_LIBS_SITE=... then uncomment R_LIBS_USER=...
# edd Jun 2017 Comment-out R_LIBS_USER
R_LIBS_USER=${R_LIBS_USER-'~/R/x86_64-pc-linux-gnu-library/3.4'}
# edd Apr 2003 Allow local install in /usr/local, also add a directory for
# Debian packaged CRAN packages, and finally the default dir
# edd Jul 2007 Now use R_LIBS_SITE, not R_LIBS
#R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With