gpt4 book ai didi

R 在 install.packages ("RGtk2") : fatal error: 'gdk/gdkx.h' file not found

转载 作者:行者123 更新时间:2023-12-04 12:30:21 25 4
gpt4 key购买 nike

当我在 R 中 install.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’

我在 macOS Sierra 10.12.3 中使用 brew 安装 GTK

最佳答案

根据INSTALL documentation ,你必须先安装 Gtk 库:

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.



我怀疑 HomeBrew 的 Gtk 可能没有正确安装在您的系统上。

进一步研究揭示 similar problems, as well as suggested troubleshooting获取 Gtk 和 RGtk2一起工作。

关于R 在 install.packages ("RGtk2") : fatal error: 'gdk/gdkx.h' file not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45364313/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com