难以安装GTK 2.8 Mac OS X 10.12.6以在R中安装Rattle包。

时间:2017-08-14 12:33:34

标签: r macos installation gtk rattle

我只想在R中安装Rattle包及其依赖项,尽管我需要GTK 2.8。由于我不是程序员,所以我选择了最简单的路线并运行自制程序,但它安装了GTK 2.24。

现在我收到此错误[完整代码]



> install.packages("rattle")
also installing the dependency ‘RGtk2’

Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘RGtk2’
Do you want to attempt to install these from sources?
y/n: n
installing the source package ‘rattle’

trying URL 'https://cran.rstudio.com/src/contrib/rattle_4.1.0.tar.gz'
Content type 'application/x-gzip' length 2665410 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

ERROR: dependency ‘RGtk2’ is not available for package ‘rattle’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rattle’
Warning in install.packages :
  installation of package ‘rattle’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/gz/hgc4y87s16gcg7q7b6fgq1hc0000gn/T/RtmpXbOVK8/downloaded_packages’
> install.packages("RGtk2")
Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘RGtk2’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘RGtk2’

trying URL 'https://cran.rstudio.com/src/contrib/RGtk2_2.20.33.tar.gz'
Content type 'application/x-gzip' length 2792938 bytes (2.7 MB)
==================================================
downloaded 2.7 MB

* 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
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for uintptr_t... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -D_R_=1 -D_REENTRANT -I/usr/local/Cellar/gtk+/2.24.31_1/include/gtk-2.0 -I/usr/local/Cellar/gtk+/2.24.31_1/lib/gtk-2.0/include -I/usr/local/Cellar/pango/1.40.9/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/1.4.8_1/include/harfbuzz -I/usr/local/Cellar/graphite2/1.3.10/include -I/usr/local/Cellar/pango/1.40.9/include/pango-1.0 -I/usr/local/Cellar/atk/2.24.0/include/atk-1.0 -I/usr/local/Cellar/cairo/1.14.10/include/cairo -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.12.4/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.41/include -I.  -DHAVE_UINTPTR_T   -I/usr/... <truncated>
RGtkDataFrame.c:502:1: warning: unused function 'r_gtk_data_frame_remove' [-Wunused-function]
r_gtk_data_frame_remove (RGtkDataFrame *data_frame,
^
1 warning generated.
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -D_R_=1 -D_REENTRANT -I/usr/local/Cellar/gtk+/2.24.31_1/include/gtk-2.0 -I/usr/local/Cellar/gtk+/2.24.31_1/lib/gtk-2.0/include -I/usr/local/Cellar/pango/1.40.9/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/1.4.8_1/include/harfbuzz -I/usr/local/Cellar/graphite2/1.3.10/include -I/usr/local/Cellar/pango/1.40.9/include/pango-1.0 -I/usr/local/Cellar/atk/2.24.0/include/atk-1.0 -I/usr/local/Cellar/cairo/1.14.10/include/cairo -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.12.4/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.41/include -I.  -DHAVE_UINTPTR_T   -I/usr/... <truncated>
Rgtk.c:7:10: 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 ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RGtk2’
Warning in install.packages :
  installation of package ‘RGtk2’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/gz/hgc4y87s16gcg7q7b6fgq1hc0000gn/T/RtmpXbOVK8/downloaded_packages’
&#13;
&#13;
&#13;

如何将GTK从2.24更新到2.8? Homebrew显然总是安装2.24。

另外,如果我安装2.8或其上面的任何版本应该工作?通常更新更好 - 至少在消费者的东西。

对于不太习惯终端的用户,是否有一个简单的指导方针?我发现https://www.hardcoded.net/devlogs/20120426但是简单的复制粘贴不起作用,我不习惯在终端中弄乱这样的东西。

0 个答案:

没有答案