RQDA - cannot load RGtk2.so

961 Views Asked by At

I've been trying to solve this one for ages. I want to use RQDA on my Mac. I have installed it (install.packages("RQDA")fine. But when I go to run it it asks if I need GTK+. I keep saying yes, but it fails.

library(RQDA)

Loading required package: RSQLite

Loading required package: gWidgetsRGtk2

Loading required package: RGtk2

Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RGtk2/libs/RGtk2.so':

dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RGtk2/libs/RGtk2.so, 6):

Library not loaded: /usr/X11/lib/libXinerama.1.dylib

Referenced from: Library/Frameworks/GTK+.framework/Versions/2.24.X11/Resources/lib/libgtk-x11-2.0.0.dylib

Reason: image not found

Need GTK+ ? (Restart R after installing)

1: Install GTK+

2: Do not install GTK+

I have checked my library path and found that the package is there but in the 3.3 version. It is sitting there "RGtk2.so".

libPaths()

[1] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"

I have googled this to death. Any ideas would be much appreciated!

2

There are 2 best solutions below

0
On

After you have installed the RQDA package, and you call the library RQDA, be careful because a popup window raises asking for install RGtk2+ components. But that window can be hidden by your open aplications over the desktop. Look for the popup window and answer yes for install. Once is installed, won't be more problems.

0
On

Install GTK from http://r.research.att.com/libs/GTK_2.24.17-X11.pkg. Make sure you have the latest XQuartz from https://www.xquartz.org/