Rattle: Installation Troubleshooting
We have worked hard to make the installation of Rattle a simple 5 minute task.
The majority of issues over the years have been with issues installing the prerequisite GTK+ libraries. That's a good place to begin if Rattle won't start up after it has been loaded (the Rattle GUI depends on the GTK+ libraries).
If you do hit any speed bumps then check below, then consult rattle-users on Google Groups and post the issue there.
On Linux, do make sure the r-base-dev package is installed, as that installs many of the required packages for compiling R packages from source.
Error in method(obj, ...) : Invalid root element: 'requires'
RGtk2 version 2.20.33 introduced some small changes that caused issues with Rattle. This has been fixed in Rattle version 5.0.14 and above which should now work with at least RGtk2 version 2.20.31 and RGtk2 2.20.33. Choose one of the alternatives below to resolve this issue:
> install.packages("https://togaware.com/access/rattle_5.0.14.tar.gz", repos=NULL, type="source")
> install.packages("rattle") > install.packages("https://cran.r-project.org/src/contrib/Archive/RGtk2/RGtk2_2.20.31.tar.gz", repos=NULL)
> install.packages("rattle") > install.packages("https://cran.r-project.org/bin/windows/contrib/3.3/RGtk2_2.20.31.zip", repos=NULL)
MS/Windows xlsx: error: Cannot create Java virtual machine (-4)
There have been reports of this error when trying to load an MS/Excel spreadsheet into Rattle. The R package that reads xlsx and xls files is called 'xlsx' but it relies on the 'rJava' package which in turn relies on Java being installed on your computer. Please make sure you have Java installed and also make sure the rJava package is installed and loadable:
> install.packages("rJava") > library(rJava)A work around is to us the new readxl package which aims to avoid the Java issues. Once it is stable Rattle will move to using it too. But for now:
> install.packages("readxl") > my_spreadsheet <- read_excel("my-spreadsheet.xls", sheet=2)Then in Rattle choose the R Dataset option on the Data tab and select "my_spreadsheet" from the drop down selector.
Mac OS/X: R 3.0.0 and RGtk2 and Rattle
The release of R 3.0.0 in April 2013 seems to be causing grief to a number of users on Mac OS/X. The problem seems to be with the installation of RGtk2 which the Rattle GUI depends on. The key is to make sure the RGtk2 package can be installed and loaded:
> install.packages("RGtk2") > library(RGtk2)
Some users have reported success eventually with the right operating system paths being set up in Mac OS/X (which is completely separate from the setup of R itself).
A specific but unsatisfactory workaround has been to revert to version 2.14.2 of R and 2.6.18 of Rattle on Mac OS/X.
Stack Overflow provides some guidance around the R 3.0.0 and RGtk2 error.Further information on installing the right version of GTK for R version 3 can be found on GitHub. Eric Triplett reports  that with rattle version 3.0.4 and R version 3.1.8 and with RGtk2, X11, XCode command line tools installed, the Rattle GUI opens but when loading a CSV file he gets the following error message in the console:
Error in resetRattle() : attempt to apply non-functionChristopher Lowenkamp upgraded to Mac OS 10.9 and re-installed XQuartz to resolve this issue. The following code demonstrates the problem (Rattle uses GTK so it is important to have a working GTK installation)
library(gWidgets) options("guiToolkit"="RGtk2") win <- gwindow("Test Window") glabel("MyLabel", container = win) gedit("Sample text.", container = win)Ivan Salgo  notes that after ensuring MacOS is upgraded to 10.9 and XQuarts is re-installed then Rattle should be installed from source:
> install.packages("rattle", repos="http://rattle.togaware.com", type="source”)
MS/Windows: Warning: package 'rattle' is in use and will not be installed
On MS/Windows, when a package has been loaded into the library (using the library() command), we can not then update it with the install.packages() command. If we see this message and are wanting to upgrade the package, simply start a fresh R, then do the install.packages().
At times the rattle package might be automatically loaded every time we start up R, even before we get a chance to issue any commands. This is usually because rattle objects have been saved as part of the workspace (possibly when we exited R at some stage when we had rattle loaded and chose to save the workspace). This is stored in the .RData file. Under this circumstance we can rename the .RData file and start up R again, or we can unload the package from the library and then attempt the installation again:
> detach(package:rattle) > install.packages("rattle")
On starting up R a quick way to check if a workspace has been automatically loaded is to issue the ls() command. With no saved workspace no objects will be listed:
> ls() character(0)
Failed to load RGtk2 dynamic library, attempting to install it.
You may also see a message about unable to connect to 'ftp.gnome.org' on port 80
This issue was noted by Jay Schindler . R needs Internet access for installing packages. This can be an issue when going through a company proxy server, for example.
If you are installing R packages by downloading them yourself or copying from a USB drive, for example, and then installing the downloaded packages within R (e.g., using install.packages with repos=NULL, or using the menu option to Install packages from local zip files, then that is fine, except for the RGtk2. You will need to install the GTK+ package yourself (it is not part of R), perhaps by following the instructions at http://www.learnanalytics.in/blog/?p=31.
If you are behind a proxy server then it is simplest to try to get your computer connected directly to the Internet. Alternatively, R can be told about the proxy server by using the environment variables HTTP_PROXY and FTP_PROXY, and it should then be able to directly connect to the Internet. See the RStudio FAQ for a good description.
Error in as.GType(type) : Cannot convert RGtkBuilder to GType
This occurs when RGtk2 is finding an older version of GTK+. This will also often be displayed if you have not restarted R after installing the GTK+ libraries. It will also be displayed if the GTK+ libraries (which are installed separately to R itself) have not been installed. On MS/Windows this can also occur if there are conflicts in your PATH, such as when there are multiple GTK+ libraries found in your PATH and you are running R 32bit but it finds GTK 64bit first. Check your PATH to ensure you don;t have multiple Gtk+ installations.
libatk-1.0-0.dll is missing from your computer
This pops up on trying to start Rattle. This could be because of one of several reasons:
GTK+ has not been installedThe RGtk2 package should automatically install GTK+ on MS/Windows. If this is the first time starting up Rattle, then this is just noticing that GTK+ has yet to be installed. Click OK and RGtk2 will ask if it should install GTK+. Choose to do so and click OK and wait for the installation to complete. Then restart R.
Need to Restart R
RGtk2 will attempt to install GTK+ libraries. After it does so you do need to restart R so that R can find the newly installed libraries.
Multiple Versions Have Been Installed
RGtk2 might be finding the wrong version of the GTK+ libraries. This has been a common problem. The best solution seems to be to remove all installations of GTK that you can find, and reinstall GTK+ through installing and then loading the RGtk2 package from within R itself.
If you want to debug this yourself, then check the PATH environment variable to ensure the right version of GTK is first in the path.
The following R command (thanks to Tony Plate) will list all versions of relevant libraries that are found in your PATH change GTK2-Runtime to gtkwin32 (if you installed as per the instructions above) or where ever you have installed Gtk2:
> for (dll in list.files("c:/GTK2-Runtime/bin/", pattern="*.dll$")) print(with(list(x=file.path(strsplit(Sys.getenv("PATH"),";")[], dll)), x[file.exists(x)]))  "C:\\GTK2-Runtime\\bin/freetype6.dll" ...  "C:\\GTK2-Runtime\\bin/zlib1.dll" >
Look for lines beginning with  in the output since they identify multiple versions of DLLs (dynamic link libraries) and are potential problems. Make sure the GTK2 version is ahead on the PATH - is is not sufficient that the GTK2 library is on the path as it has to be ahead of conflicting DLLs.
error: 'exdir' does not exist
Error : .onLoad failed in loadNamespace() for 'RGtk2', details: call: unzip(path, exdir = .windows_gtk_path) error: 'exdir' does not exist Error: package/namespace load failed for 'RGtk2'
The above occurred with version of RGtk2 prior to 2.20.17 when it tried to install the GTK+ libraries. The unzipping of the downloaded gtk+ zip file failed. Consequently the required GTK libraries were not installed.
RGtk2 uses a call to a new procedure in the zlib1.dll library. Older versions of this library do not contain this procedure. Thus you may see a message of the form: The procedure entry point deflateSetHeader could not be located in the dynamic link library zlib1.dll. With a fresh install on Windows I believe this does not happen. If it does then the chances tend to be that some other application in your PATH environment variable provides a conflicting version of zlib1.dll which is overriding the one from GTK+. For example, Luc Kesters noted that C:\program files\Intel\WiFi\bin was in the path with a conflicting version. A solution is to search for and remove these older zlib1.dll's from the PATH or from whichever application installed the competing zlib1.dll.
Some users report issues installing XML (Windows 2007) and R 2.13.0. Since R 2.14.0 these have been fixed. Testing on Windows 7 and R 2.13.0 seems to work just fine using:
This should automatically retrieve the package from /www.stats.ox.ac.ukXML_3.4-0.2.zip, irrespective of which archive you request the download from. Otherwise you can download the ZIP file by hand and then install it directly with:
> install.packages("XML_3.4-0.2.zip", repos=NULL)
Missing libxml and iconv
On Windows 7, 32bit, when installing GGobi some users report that we may also need to manually install the libxml2-2.7.7.win32.zip  and iconv-1.9.2.win32.zip  binary libraries from http://xmlsoft.org/sources/win32/. These libraries are included in the older sourceforge package of GTK+ but not the gtk.org package. There is currently  no 64bit version for Windows. Unzip the downloads and place the dll's into c:\gtkwin32\bin. (Thanks to Michael Lane  for the details.)
Entry point cairo_glyph_allocate not located in libcairo-2.dll
You probably have an older version of GTK+ installed (perhaps in addition to the newer version). Remove all GTK+ installs and just install as above.
Entry point not located: cairo_clip_extentsFionn Hope reported 20 November 2010 the following error: The procedure entry point cairo_clip_extents could not be located in the dynamic link library libcairo-2.dll. Once the GGobi package was removed the error went away.
GNU/Linux: Invalid object type GtkListStore
Error in rattle() : attempt to apply non-function In addition: Warning message: In method(obj, ...) : Invalid object type `GtkListStore'
This is often because GTK is not installed (perhaps you are using KDE rather than GTK). A simple solution  is to install the glade package which will pull in the development version of the GTK packages
$ sudo apt-get install glade
GNU/Linux: Bad Characters: System Needs to be UTF-8Thanks to Igor Gregovitch for this: For some translations (e.g., French) accentuated letters show as a crossed box and various other characters do not display properly. Also the Execute button will not work because Data is translated to Donn[x]es instead of Données. The issue relates to using an ISO encoding on the system rather than a UTF-8 encoding (/etc/default/locale). Switch to UTF-8 using
$ wajig reconfigure localesor some variation using dpkg or apt-get. Choose the correct locale, such as fr_FR.UTF-8 instead of fr-FR@euro ISO-8859-15. Restart and it works just fine.
GNU/Linux: configure: error: GTK version 2.8.0 requiredThis error occurs when attempting to install the RGtk2 package. The install is looking for the header files for GTK. Possibly they are not yet installed on your operating system. For Ubuntu and Debian, this is easily solved:
$ wajig install libgtk2.0-dev
GNU/Linux: Cannot find xml2-config
XML related developer packages are required in order to install the R XML package. These can be installed using:
$ wajig install libxml2-dev
GNU/Linux: Error in asCairoDevice(...) : Graphics API version mismatch
This is usually solved with a reinstall (from source so that it is compiled against the installed version of the Cairo libraries) of the cairoDevice package.
This is seen to fail if the package libgtk2.0-dev is not installed. Make sure it is installed for your distribution of Linux.
'dispatchExecuteButton' est appelé avec un onglet
'dispatchExecuteButton' wurde mit einem unbekannten Tab
There seems to be an issue with internationalisation under Mac OSX. A work around is to set the language to English, at least until we work out what the issue is:
> Sys.setenv(LANGUAGE="en") > library(rattle) > rattle()
Mac/OSX: LOCALE Issues
Morgan Vallat noted that there are LOCALE issues for OSX which can be fixed by starting R and then quiting so that preferences are created. Then launch a terminal and execute:
defaults write org.R-project.R force.LANG en_US.UTF-8
Mac/OSX: CGContextSetFont: invalid context 0x0
 This is a long standing issue with Mac/OSX. These messages are displayed on starting rattle(). These appear when the rattle_window is shown and again when we configure the GUI. As best I can tell no functionality is affected and the errors can be ignored.
Mac/OSX: Gtk-WARNING **: Unable to find default local directory monitor type
 This is a long standing issue with Mac/OSX and appears to only be a warning that can be ignored.
Copyright © 2006-2017 Togaware Pty Ltd
This site is hosted in the cloud by Web Faction.
Last Modified 2017-06-22 07:37:57 Graham Williams
Shop at Amazon