在 macOS Sierra 10.12.6 和 R 版本 3.4.1 上安装 RGtk2
Install RGtk2 on macOS Sierra 10.12.6 and R Version 3.4.1
我的最终目标是在 R 中安装 rattle 包,为此,我需要安装依赖项 RGtk2。
这个问题类似于Installing RGtk2 on macOS Sierra (Version 10.12.4) and R version 3.4.0
但是我安装了 gtk。
这个问题类似于 R In install.packages("RGtk2") : fatal error: 'gdk/gdkx.h' file not found
但这个问题仍然悬而未决,我希望有人能对这个问题有更多的了解。
我遇到的错误如下:
* installing to library ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library’
* installing *source* package ‘RGtk2’ ...
** package ‘RGtk2’ successfully unpacked and MD5 sums checked
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for INTROSPECTION... no
checking for GTK... yes
checking for GTHREAD... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
...
Rgtk.c:7:10: fatal error: 'gdk/gdkx.h' file not found
#include <gdk/gdkx.h>
我见过强制或忽略 gdk/gdkx.h 的解决方案,但对我来说似乎很可疑。
为了安装 rattle,我执行了以下步骤。在这个字符串 R 3.0 and GTK+ / RGTK2 error, I tried downloading Simon Urbanek's library from http://r.research.att.com/#other 之后,使用 GTK_2.24.17-X11.pkg 但它不起作用。
出于同一个问题,我还通过复制他们提供的命令从 brew.sh 安装了自制软件。
brew install gtk+
export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:$PKG_CONFIG_PATH
R CMD INSTALL /Users/joshualamstein/Downloads/RGtk2_2.20.33.tar
这导致了我现在的结果,以及我的问题。我的最终目标是在 R 中安装 rattle 包,为此,我需要安装依赖项 RGtk2。如果您有任何帮助,我们将不胜感激。谢谢!
zhiyzou 在这里发布的解决方案适用于 Sierra 10.12.6 和 R 3.4.2:https://gist.github.com/zhiyzuo/a489ffdcc5da87f28f8589a55aa206dd
然后一定要重启Rstudio,或者通过XQuartz启动。
我的最终目标是在 R 中安装 rattle 包,为此,我需要安装依赖项 RGtk2。
这个问题类似于Installing RGtk2 on macOS Sierra (Version 10.12.4) and R version 3.4.0 但是我安装了 gtk。 这个问题类似于 R In install.packages("RGtk2") : fatal error: 'gdk/gdkx.h' file not found 但这个问题仍然悬而未决,我希望有人能对这个问题有更多的了解。
我遇到的错误如下:
* installing to library ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library’
* installing *source* package ‘RGtk2’ ...
** package ‘RGtk2’ successfully unpacked and MD5 sums checked
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for INTROSPECTION... no
checking for GTK... yes
checking for GTHREAD... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
...
Rgtk.c:7:10: fatal error: 'gdk/gdkx.h' file not found
#include <gdk/gdkx.h>
我见过强制或忽略 gdk/gdkx.h 的解决方案,但对我来说似乎很可疑。
为了安装 rattle,我执行了以下步骤。在这个字符串 R 3.0 and GTK+ / RGTK2 error, I tried downloading Simon Urbanek's library from http://r.research.att.com/#other 之后,使用 GTK_2.24.17-X11.pkg 但它不起作用。
出于同一个问题,我还通过复制他们提供的命令从 brew.sh 安装了自制软件。
brew install gtk+
export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:$PKG_CONFIG_PATH
R CMD INSTALL /Users/joshualamstein/Downloads/RGtk2_2.20.33.tar
这导致了我现在的结果,以及我的问题。我的最终目标是在 R 中安装 rattle 包,为此,我需要安装依赖项 RGtk2。如果您有任何帮助,我们将不胜感激。谢谢!
zhiyzou 在这里发布的解决方案适用于 Sierra 10.12.6 和 R 3.4.2:https://gist.github.com/zhiyzuo/a489ffdcc5da87f28f8589a55aa206dd
然后一定要重启Rstudio,或者通过XQuartz启动。