Hi Iryna, The two paths seem to be a "user" path (one beneath your home directory) and a "system" path (one in another branch of the directory tree). You usually have to have superuser privileges to write files in the second. In most *NIX systems you use "su" to become "root" (the superuser), and if you can do this, then perform the update.
Jim On Fri, Apr 17, 2015 at 7:25 PM, Iryna Nikolayeva <iryna.v.nikolay...@gmail.com> wrote: > Dear R project members, > I have an issue while automatically updating packages. > For the packages installed in my second library, while automatically updating > I get the following "Permission denied” messages(details below). > I suppose I know where this problem comes from: > I had installed a few different versions of R. > And now I have 2 library paths: >> .libPaths() > [1] "/Users/iryna/Library/R/3.1/library" > [2] "/opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library” > > And for some reason R just doesn’t have rights to update packages in my > second library. > Do you know why is that? How should I fix this issue? > > Here is the error message: > > * installing *source* package ‘mgcv’ ... > ** package ‘mgcv’ successfully unpacked and MD5 sums checked > mv: rename > /opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/mgcv > to > /opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/00LOCK-mgcv/mgcv: > Permission denied > Warning in file.copy(f, instdir, TRUE) : > problem copying ./NAMESPACE to > /opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/mgcv/NAMESPACE: > Permission denied > Warning in file(file, ifelse(append, "a", "w")) : > cannot open file > '/opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/mgcv/DESCRIPTION': > Permission denied > Error in file(file, ifelse(append, "a", "w")) : > cannot open the connection > ERROR: installing package DESCRIPTION failed for package ‘mgcv’ > * removing > ‘/opt/local/Library/Frameworks/R.framework/Versions/3.1/Resources/library/mgcv’ > > > > > Here are some additional information on my settings: >> version > _ > platform x86_64-apple-darwin13.4.0 > arch x86_64 > os darwin13.4.0 > system x86_64, darwin13.4.0 > status > major 3 > minor 1.2 > year 2014 > month 10 > day 31 > svn rev 66913 > language R > version.string R version 3.1.2 (2014-10-31) > nickname Pumpkin Helmet > > Thanks in advance for your help, > — > > Iryna Nikolayeva > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.