Skip to content

R on Mac: framework or homebrew?

2 messages · Zhang Xinlian, Rainer M Krug

#
I used brew install R to install R and I use the most recent version of 
Rstudio. And when I use the "export" in Rstudio, it tells me the following. 
Warning messages:
1: In cairo_pdf(file = "/Users/xinlianzhang/Desktop/Rplot.pdf", width = 
5.22917,  :
  unable to load shared object 
'/usr/local/Cellar/r/3.2.0_1/R.framework/Resources/library/grDevices/libs//cairo.so':
  
dlopen(/usr/local/Cellar/r/3.2.0_1/R.framework/Resources/library/grDevices/libs//cairo.so, 
6): Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: 
/usr/local/Cellar/r/3.2.0_1/R.framework/Resources/library/grDevices/libs//cairo.so
  Reason: Incompatible library version: cairo.so requires version 13.0.0 or 
later, but libjpeg.8.dylib provides version 12.0.0
2: In cairo_pdf(file = "/Users/xinlianzhang/Desktop/Rplot.pdf", width = 
5.22917,  :
  failed to load cairo DLL

? 2013?9?12???? UTC-4??10:20:07?Rainer M Krug???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20150604/44fd4d27/attachment-0001.html>
#
Zhang Xinlian <coral90zhang at gmail.com> writes:
Did you upgrade cpp in homebrew after the installation from R? Errors
like seem to happen when compiler versions / libraries don't match.

If yes, reinstall libjpeg and the cairo programs, and, maybe, even R.

Otherwise I would suggest to try the same in an R session from the
terminal and see if you have the error there - because I don't know how
well RStutio works together with homebrew installed R - doesn't RStudio
come with  it's own R installation?

Cheers,

Rainer