I am using ubuntu. When I tried install.packages("RGtk2") it downloaded and seemed to compile successfully: ** building package indices ... * DONE (RGtk2) The downloaded packages are in /tmp/Rtmp57id87/downloaded_packages However, when I tried library(RGtk2) I found Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so': /usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so: undefined symbol: cairo_path_data_type_get_type Error in fun(...) : Failed to load RGtk2 dynamic library: Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so': /usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so: undefined symbol: cairo_path_data_type_get_type Error : .onLoad failed in 'loadNamespace' for 'RGtk2' Error: package/namespace load failed for 'RGtk2' Any suggestions? Steve
On Thu, Aug 02, 2007 at 05:12:23PM -0400, steve wrote:> I am using ubuntu. When I tried install.packages("RGtk2") it downloaded > and seemed to compile successfully:Please try $ sudo apt-get install r-cran-rgtk2 which should also install a matching r-cran-cairodevice.> ** building package indices ... > * DONE (RGtk2) > > The downloaded packages are in > /tmp/Rtmp57id87/downloaded_packages > > However, when I tried library(RGtk2) I found > > Error in dyn.load(x, as.logical(local), as.logical(now)) : > unable to load shared library > '/usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so': > /usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so: undefined symbol: > cairo_path_data_type_get_type > Error in fun(...) : Failed to load RGtk2 dynamic library: Error in > dyn.load(x, as.logical(local), as.logical(now)) : > unable to load shared library > '/usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so': > /usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so: undefined symbol: > cairo_path_data_type_get_type > > Error : .onLoad failed in 'loadNamespace' for 'RGtk2' > Error: package/namespace load failed for 'RGtk2' > > Any suggestions?Gtk2 library mismatch. You didn't tell you which version of Ubuntu, R, RGtk2, ... you are using so it's a bit hard to guess. FWIW on my Ubuntu machine(s) at work, I install these from CRAN sources and that works without a hitch. Consider signing up on r-sig-debian where Debian / Ubuntu questions are more topical. Hth, Dirk -- Three out of two people have difficulties with fractions.
A bit more information Ubuntu: dapper drake with all updates R: 2.5.0 RGtk2: 2_2.11.0-1 cairoDevice 2.3.0 sudo apt-get install r-cran-rgtk2 Reading package lists... Done Building dependency tree... Done E: Couldn't find package r-cran-rgtk2
On 8/2/07, steve <fisk@bowdoin.edu> wrote:> > I am using ubuntu. When I tried install.packages("RGtk2") it downloaded > and seemed to compile successfully: > > ** building package indices ... > * DONE (RGtk2) > > The downloaded packages are in > /tmp/Rtmp57id87/downloaded_packages > > However, when I tried library(RGtk2) I found > > Error in dyn.load(x, as.logical(local), as.logical(now)) : > unable to load shared library > '/usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so': > /usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so: undefined symbol: > cairo_path_data_type_get_type > Error in fun(...) : Failed to load RGtk2 dynamic library: Error in > dyn.load(x, as.logical(local), as.logical(now)) : > unable to load shared library > '/usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so': > /usr/local/lib/R/site-library/RGtk2/libs/RGtk2.so: undefined symbol: > cairo_path_data_type_get_type > > Error : .onLoad failed in 'loadNamespace' for 'RGtk2' > Error: package/namespace load failed for 'RGtk2' > > Any suggestions?It looks like you found a bug in RGtk2 >= 2.10.9 that affects systems with older versions of cairo (pre 1.2.0). This was just a typo. I will upload a fixed version soon. Sorry, Michael Steve> > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]