R In install.packages(“RGtk2”) : fatal error: 'gdk/gdkx.h' file not found

后端 未结 2 1307
野的像风
野的像风 2021-01-18 11:00

when I install.packages(\"RGtk2\") in R this I get this problem:

    fatal error: \'gdk/gdkx.h\' file not found
#include 
         ^
1 erro         


        
2条回答
  •  逝去的感伤
    2021-01-18 11:49

    According to the INSTALL documentation, you have to have Gtk libraries installed first:

    In all cases (i.e. Unix or Windows, source or binary), you will need to have the appropriate Gtk libraries.

    For Windows, you can download the GTK Developer's Pack from http://gladewin32.sourceforge.net/

    For Unix, you can fetch the source files for the different libraries from ftp://ftp.gtk.org/pub/gtk/v2.8/

    GTK makes extensive use of other libraries and particular versions of these dependant libraries. As a result, installing GTK (under Unix) can be a time consuming and apparently indirect process that involves installing numerous sub-libraries.

    I suspect HomeBrew's Gtk might not be installed on your system properly.

    Further research reveals similar problems, as well as suggested troubleshooting to get Gtk and RGtk2 to work together.

提交回复
热议问题