当我在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塞拉利昂10.12.3中使用brew安装GTK
发布于 2018-06-14 15:17:51
RGtk2的安装现在可以轻松得多。首先安装自制软件,然后在R中:
system('brew install gtk+')
install.packages(
'RGtk2', type = 'mac.binary.el-capitan', repos = 'https://macos.rbind.org'
)如果您不喜欢使用存储库https://macos.rbind.org (由我创建)来安装预构建的二进制包,您可以只从源代码安装RGtk2:
system('brew install gtk+')
install.packages('RGtk2', type = 'source')如果有人对技术细节感到好奇,“gdk/gdkx.h‘文件未找到”的错误已在此承诺上的RGtk2回购中修复。
https://stackoverflow.com/questions/45364313
复制相似问题