Skip to content

similar problems installing Rcmdr with R.

14 messages · rsparapa at mcw.edu, Hebblewhite, Mark, John Fox +1 more

#
I have recently installed R 3.0.1 on my MacBook Pro OS  X 10.8.5 (very new
version), and am experiencing similar problems that Sarah Hardy posted
almost a month ago. I similarly teach an introduction to R course to about
20 graduate students, many of whom use Mac's, but luckily not this
semester. I have used R for > 6 years, but am new (1 year) to MACs, but
expect that if I'm having this problem with 10.8.5, then others must be
too. 

 I have read through the entire thread of solutions for this problem on
this list serve, the notes on Joseph Fox's webpage
(http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html)
 and have tried to do my absolute best to fix the problem myself and with
a colleague.  Here is a summary of my particulars:

1. I have a Mac OS X 10.8.5, and updated everything today.
2. I also installed the XQuartz package today, version 2.7.4 from last
Sept 2012.
3. I uninstalled R manually from my MAC (both moving old version to the
trash and cleaning out R directories)
4. I re-installed R (R 3.0.1 GUI 1.61 Snow Leopard build (6492) directly
from the CRAN (Italy) using this command:

install.packages("Rcmdr", dependencies = TRUE)

	5. I then followed the instructions for downloading Rcmdr package in both
the command line and from the R.app menu. I have also tried it from two
different CRAN sites. It downloaded and installed apparently fine as it
appears in my library files (version dated august 22)

The downloaded binary packages are in
	/var/folders/30/710s5wkn59959r6mfhmssyvrc0w434/T//RtmpGry9Bb/downloaded_pa
ckages

6. 	No matter what series of these steps I take, I receive the similar
error message as others:

 library(Rcmdr)

Error : .onLoad failed in loadNamespace() for 'tcltk', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.0/Resources/library/tcltk/libs/
tcltk.so':
  
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/tcltk
/libs/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.6.dylib
  Referenced from: 
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/tcltk/libs/t
cltk.so
  Reason: no suitable image found.  Did find:
	/usr/local/lib/libtcl8.6.dylib: stat() failed with errno=13
	/usr/local/lib/libtcl8.6.dylib: stat() failed with errno=13
Error: package or namespace load failed for ?Rcmdr?

7. From previous posts on this list serve
[http://grokbase.com/t/r/r-sig-mac/138nv3tj17/unable-to-load-rcmdr-with-r-3
-0-1-on-a-mac-os-x-10-8-3] I followed this set of instructions to see
whether there were problems with my permissions:
ls: /usr/local/lib: Permission denied
ls: /usr/local/lib/libtcl*: Permission denied
drwx------  8 root  wheel  272 Sep 24 10:21 /usr/local


8. But in my disk utilities I can see no clear disk permissions related to
R. I ran repair disk permissions earlier today and there was 1 R problem
but that?s been apparently fixed.

My own troubleshooting abilities are at an end.

As best I can determine, it seems as if the XQuartz version I downloaded
might not be working with my Mac OSX 10.8.5, but beyond that I really have
no clue how best to proceed.

thanks very much for your patience with this problem and with me if my
query is na?ve in anyway.

Sincerely,

Mark Hebblewhite
Wildlife Biology Program
Department of Ecosystem and Conservation Sciences
College of Forestry and Conservation
University of Montana
32 Campus Drive
Missoula, MT, 59812
Phone: 1-406-243-6675
Email: mark.hebblewhite at umontana.edu
Website: http://www.cfc.umt.edu/Heblab/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BB12F55E-E208-43FA-9D98-CCD7374AA5C9[1].png
Type: image/png
Size: 44276 bytes
Desc: BB12F55E-E208-43FA-9D98-CCD7374AA5C9[1].png
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20130924/f3d429f2/attachment-0001.png>
#
On 09/24/2013 07:45 AM, Hebblewhite, Mark wrote:
Hi Mark:

I am assuming you came to Mac from Windows, rather than UNIX/Linux,
right?  On Mac OS X (and UNIX/Linux in general), you need to have 
permission to read/write/execute files.  But, I think you can fix
this rather easily.  In a terminal...
% sudo zsh
# chmod -R 755 /usr/local
#
Dear Mark,

As was the case with other similar recent problems, this issue appears to
pertain to the tcltk package and only indirectly to the Rcmdr. You can
verify that by trying to load tcltk directly via library(tcltk).

I assume that when you say that you updated everything, that included
running Mac OS X Software Update.

As you point out, your problem appears to be similar to an earlier problem
reported by Sarah Hardy at
<http://grokbase.com/t/r/r-sig-mac/138nv3tj17/unable-to-load-rcmdr-with-r-3-
0-1-on-a-mac-os-x-10-8-3>. In her case, fixing the files permissions fixed
the problem, as indicated in the same thread. Did 

	sudo chmod a+rx /usr/local/*

work for you as it did for her? (I see that Rodney Sparapani has just made
an equivalent suggestion.)

Another question, assuming that this fix works, is why you experienced the
problem in the first place. In Sarah's case, the permissions were screwed up
by MacPorts.

I'm copying this response to Simon Urbanek to make sure that he's aware of
this thread (though there's no need for Simon to respond if fixing the
permissions works).

I hope this helps,
 John
#
Yes, the solution proposed by Rodney Sparapani below worked to fix my
problem, but was a slightly different command than proposed to Sarah
earlier. 


Thanks very much Rodney! It will be challenging to fix this problem,
however, for other 'na?ve' users of MAC if the solution is different each
time. 

Thanks very much John, Simon and Rodney!
On 09/24/2013 07:45 AM, Hebblewhite, Mark wrote:
Hi Mark:

I am assuming you came to Mac from Windows, rather than UNIX/Linux,
right?  On Mac OS X (and UNIX/Linux in general), you need to have
permission to read/write/execute files.  But, I think you can fix
this rather easily.  In a terminal...
% sudo zsh
# chmod -R 755 /usr/local
#
Dear Mark,
Just to be clear:

	sudo chmod a+rx /usr/local/*

didn't work, but

	sudo zsh
	chmod -R 755 /usr/local

did work?

Frankly, I don't get that, since the first command should insure that
everyone has (at least) read and execute permission (i.e., level 5).

I think that I'll add a trouble-shooting section to the Rcmdr Mac
installation notes, but I would like to understand why one approach worked
here and not the other.

Best,
 John
#
On 09/24/2013 01:34 PM, John Fox wrote:
Hi John:

That makes sense.  sudo chmod a+rx /usr/local/* does not descend into
the subdirectories.  To make that work, you need
sudo chmod -R a+rx /usr/local
#
Hi Rodney,

Thanks for the explanation. I guess that Sarah's but not Mark's
file-permission problems were all at the first level of usr/local/.

Best,
 John
#
Hi Rodney,

I've added a section on "Mac OS X Trouble-shooting" to the Rcmdr
installation notes at
<http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html>,
with explicit instructions on the recent problems experienced by Sarah and
Mark. I'd appreciate it if you could take a look at this to see whether the
instructions are clear. Also, are there other cases that I should cover?

Thanks,
 John
#
On Sep 24, 2013, at 8:34 PM, John Fox <jfox at mcmaster.ca> wrote:

            
The later is bad, do NOT use it! It will set exec permissions on *everything* even files are are not supposed to be executable.
You probably want

sudo chmod -R a+rX /usr/local

Cheers,
Simon
#
Yes, originally, 


1) sudo chmod a+rx/usr/local/* did not work but

2) sudo zsh
chmod -R 755/usr/local

did work.

However, at your advice, Simon, I've gone and entered

3) sudo chmod -R a+rX /usr/local


in terminal, and now Rcmdr works.

Is there something else I should do to 'reverse' the 2nd incorrect command?

Incidentally, this is obviously a broader problem and I encountered
similar problems with other packages like adehabitat.

Thanks SO much for all your assistance and help, especially for updating
the help files for Rcmdr John. I will ask some of my current graduate
students to test it out on their Mac's too.

thanks again!

Mark Hebblewhite
On 9/25/13 8:30 AM, "Simon Urbanek" <simon.urbanek at r-project.org> wrote:

            
#
Dear Simon,
Yes, that's better than what I had in the troubleshooting section of the
Rcmdr installation notes, which was 

  sudo chmod -R a+rx /usr/local

and which, as you say, would set execute permission for files as well as
directories. I've fixed that now.

When I first read Mark's message, I didn't realize that there were
subdirectories below /usr/local that might also have incorrectly set
permissions.

Thanks,
 John
#
Dear Mark,
Of course. As I explained earlier, the problem was that the tcltk package
couldn't load, not with the Rcmdr directly, and the adehabitat package also
uses the tcltk package.
They likely won't experience the same problem as you did, unless they too
have incorrect permissions set for the /usr/local directory or
subdirectories of it. Most people who follow the Rcmdr Mac OS X installation
notes won't experience a problem. Anyway, I have some troubleshooting tips
there now that cover the issue that arose on your Mac. If you turn up other
problems not currently covered by the notes, I'd appreciate learning about
them.

Best,
 John
#
On 09/24/2013 07:57 PM, John Fox wrote:
Hi John:

It looks pretty good to me; lot's of useful info.  I see that you have
sudo chmod -R a+rX /usr/local
as has been suggested.  It definitely makes sense; why have
/usr/local if no one can actually do anything with it?  However,
we are doing a bit more than fixing this issue at hand.  What if you
said it this way?

Having confirmed the problem, you can change the file permissions in 
/usr/local/lib by opening a terminal window on your Mac (Terminal.app is 
in the Applications Utilities folder) and entering the following command 
at the $ prompt in the terminal window:

         sudo chmod -R a+rX /usr/local/lib

     The operating system will ask you to supply your password to 
execute this command.

File-permissions problems such as this may also occur
when you attempt to install other R packages.  In that case, you
might consider performing the same operation on the directories
/usr/local/bin and/or /usr/local/include.  Since there is not
much point having /usr/local if no one can actually use it, then
you might consider altering the entire /usr/local hierarchy:

         sudo chmod -R a+rX /usr/local


But, now we have traveled pretty far afield from just Rcmdr...
#
Hi Rodney,

Unless you see a compelling reason not to, I think that I'll stick with the
current version of the instructions. The object is to have something simple
for unsophisticated users, and the current version of the troubleshooting
instructions are already a bit complicated.

Best,
 John