when I install.packages("RGtk2") in R this I get this problem:
当我在R中安装.packages(“RGtk2”)时,我遇到了这个问题:
fatal error: 'gdk/gdkx.h' file not found
#include <gdk/gdkx.h>
^
1 error generated.
make: *** [Rgtk.o] Error 1
ERROR: compilation failed for package ‘RGtk2’
* removing ‘/usr/local/lib/R/3.4/site-library/RGtk2’
* restoring previous ‘/usr/local/lib/R/3.4/site-library/RGtk2’
I install GTK using brew in macOS Sierra 10.12.3
我在macOS Sierra 10.12.3中使用brew来安装GTK。
1 个解决方案
#1
3
According to the INSTALL documentation, you have to have Gtk libraries installed first:
根据安装文档,您必须首先安装Gtk库:
In all cases (i.e. Unix or Windows, source or binary), you will need to have the appropriate Gtk libraries.
在所有情况下(例如Unix或Windows、源代码或二进制文件),都需要适当的Gtk库。
For Windows, you can download the GTK Developer's Pack from http://gladewin32.sourceforge.net/
对于Windows,您可以从http://gladewin32.sourceforge.net/下载GTK开发人员的包
For Unix, you can fetch the source files for the different libraries from ftp://ftp.gtk.org/pub/gtk/v2.8/
对于Unix,您可以从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.
GTK广泛使用其他库和这些依赖库的特定版本。因此,安装GTK(在Unix下)可能是一个耗时且明显间接的过程,需要安装大量的子库。
I suspect HomeBrew's Gtk might not be installed on your system properly.
我怀疑HomeBrew的Gtk可能不会正确地安装在您的系统上。
Further research reveals similar problems, as well as suggested troubleshooting to get Gtk and RGtk2
to work together.
进一步的研究揭示了类似的问题,并建议故障排除,以使Gtk和RGtk2协同工作。
#1
3
According to the INSTALL documentation, you have to have Gtk libraries installed first:
根据安装文档,您必须首先安装Gtk库:
In all cases (i.e. Unix or Windows, source or binary), you will need to have the appropriate Gtk libraries.
在所有情况下(例如Unix或Windows、源代码或二进制文件),都需要适当的Gtk库。
For Windows, you can download the GTK Developer's Pack from http://gladewin32.sourceforge.net/
对于Windows,您可以从http://gladewin32.sourceforge.net/下载GTK开发人员的包
For Unix, you can fetch the source files for the different libraries from ftp://ftp.gtk.org/pub/gtk/v2.8/
对于Unix,您可以从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.
GTK广泛使用其他库和这些依赖库的特定版本。因此,安装GTK(在Unix下)可能是一个耗时且明显间接的过程,需要安装大量的子库。
I suspect HomeBrew's Gtk might not be installed on your system properly.
我怀疑HomeBrew的Gtk可能不会正确地安装在您的系统上。
Further research reveals similar problems, as well as suggested troubleshooting to get Gtk and RGtk2
to work together.
进一步的研究揭示了类似的问题,并建议故障排除,以使Gtk和RGtk2协同工作。