[R-SIG-Mac] Can't get help.start() to work.
Simon Urbanek
simon.urbanek at r-project.org
Thu Oct 29 23:45:14 CET 2009
On Oct 29, 2009, at 6:32 PM, Rolf Turner wrote:
>
> On 30/10/2009, at 4:10 AM, Simon Urbanek wrote:
>
> <snip>
>
>>> from the command line (in the window opened by the GUI). I get an
>>> error:
>>>
>>>> Loading required package: mgcv
>>>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>>> unable to load shared library '/Users/rturner/Rlib/lattice/libs/
>>>> i386/lattice.so':
>>>> dlopen(/Users/rturner/Rlib/lattice/libs/i386/lattice.so, 6):
>>>> Library not loaded: /Library/Frameworks/R.framework/Versions/2.7/
>>>> Resources/lib/libR.dylib
>>
>> note the version 2.7 there - you have apparently old packages for a
>> different version of R on your .libPaths() -- bad thing.
>
> I don't understand how the 2.7 gets in there. My .libPaths()
> (from the GUI startup) says:
>
>> > .libPaths()
>> [1] "/Users/rturner/Rlib" "/Library/
>> Frameworks/R.framework/Resources/library"
>
> And /Library/Frameworks/R.framework is the current install
> of 2.10.0. I had a look in /Library/Frameworks/R.framework/
> Versions/Current
> and it indeed seems to be the current version.
>
> So how the (expletive deleted) is version 2.7 getting dragged
> into the picture?
>
It's in /Users/rturner/Rlib and in fact you can see that in the error.
So I don't think it's deleted, really ;).
>> I suspect this is all rather due to the customization and chaos
>> created by the user ;) - the GUI actually tries to prevent such
>> things
>> by using separate library directories for each R version by default,
>> but if you override that with your settings (especially using one
>> global library), you can mess up things - but that's true in R in
>> general, not really related to GUIs.
>
> As far as I can tell, the only customization that I've done
> is to use ~/Rlib as my ``local'' personal library of packages.
> I.e. I have the lines
>
>> .libPaths("/Users/rturner/Rlib")
>> Sys.setenv(R_LIBS="/Users/rturner/Rlib")
>
>
> in my .Rprofile. Is there anything wrong with that?
>
Yes - at least when you don't tend to it properly. If you use a global
library, you must make sure you delete it whenever you upgrade R,
otherwise you'll end up with incompatible packages. (There are less
radical approaches, but they require even more care on user's side to
work). That's why we recommend versioned libraries.
> BTW, you wrote:
>
>> Check your .libPaths() - I bet they are different and you have
>> outdated packages in one of them. If you wonder why, check your
>> preferences.
>
> You lose your bet! From GUI startup I got .libPaths() as
> shown above. From the command line startup I get
>
>> > .libPaths()
>> [1] "/Users/rturner/Rlib"
>> [2] "/Library/Frameworks/R.framework/Resources/library"
>
> Looks the same to me!
>
Yes, you're right on that one -- but both use your custom Rlib which
is what causes the issue. Now why lattice loads in one or the other is
a good question and the answer may be in the difference when .Rprofile
is executed in one and the other (that part differs between the GUI
and the command line) so I suspect .libPaths() are in fact different
when lattice is loaded (explicitly or implicitly).
> cheers,
>
> Rolf
>
> P. S. Since I'm raving on, I shall rave about another issue that
> has puzzled me
> immensely. I cannot seem to get package installation to work
> (completely)
> from within R. If I do something like
>
> > install.packages("plotrix",lib="Rlib")
"Rlib" is a relative path - try using the absolute path.
Cheers,
Simon
>> --- Please select a CRAN mirror for use in this session ---
>> Loading Tcl/Tk interface ... done
>> trying URL 'http://cran.stat.auckland.ac.nz/bin/macosx/universal/
>> contrib/2.10/plotrix_2.7-2.tgz'
>> Content type 'application/x-tar' length 415153 bytes (405 Kb)
>> opened URL
>> ==================================================
>> downloaded 405 Kb
>>
>>
>> The downloaded packages are in
>> /tmp/Rtmpxp23QK/downloaded_packages
>> Warning messages:
>> 1: In file.rename(file.path(tmpDir, curPkg), instPath) :
>> cannot rename file 'Rlib/file60b7acd9/plotrix' to 'Rlib/plotrix',
>> reason 'No such file or directory'
>> 2: unable to move temporary installation 'Rlib/file60b7acd9/
>> plotrix' to 'Rlib/plotrix'
>
> If I (in another window) cd to /tmp/Rtmpxp23QK/downloaded_packages I
> find
> a file plotrix_2.7-2.tgz, and if I then execute
>
> R CMD INSTALL plotrix_2.7-2.tgz
>
> from the (shell) command line, it installs just fine.
>
> Any insights into what's going wrong?
>
> R.
>
> ######################################################################
> Attention:This e-mail message is privileged and confidential. If you
> are not theintended recipient please delete the message and notify
> the sender.Any views or opinions presented are solely those of the
> author.
>
> This e-mail has been scanned and cleared by MailMarshalwww.marshalsoftware.com
> ######################################################################
>
>
More information about the R-SIG-Mac
mailing list