[R] issue with package updates
r.turner at auckland.ac.nz
Sat Apr 18 03:42:21 CEST 2015
On 18/04/15 12:04, Jim Lemon wrote:
> 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.
(1) The OP seems to be using a Mac OSX system (which has Unix underlying
a great deal of gloppedy obfuscating point-and-click crap).
(2) My reading of the help for install.packages() leads me to believe
that by default the requested package should be installed into the
*first* entry of .libPaths(), whence no superuser privileges should be
required. It is mysterious to me why the system seems to be intent on
using the *second* entry of .libPaths() so that superuser privileges
(3) Since this is Mac OSX stuff, the OP might get better mileage by
posting on R-Sig-Mac.
> On Fri, Apr 17, 2015 at 7:25 PM, Iryna Nikolayeva
> <iryna.v.nikolayeva at 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:
>>  "/Users/iryna/Library/R/3.1/library"
>>  "/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:
>> platform x86_64-apple-darwin13.4.0
>> arch x86_64
>> os darwin13.4.0
>> system x86_64, darwin13.4.0
>> 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
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
Home phone: +64-9-480-4619
More information about the R-help