r语言 - 安装"rattle"包时出错



我一直无法在我的Mac上安装"rattle"。 尝试单独安装软件包,尝试在依赖项设置为 true 的情况下进行安装,但都无济于事。我已经安装了Xquartz,编译器等。

如果有人能指出我正确的方向,我将不胜感激。谢谢!

> version
_                           
platform       x86_64-apple-darwin15.6.0   
arch           x86_64                      
os             darwin15.6.0                
system         x86_64, darwin15.6.0        
status                                     
major          3                           
minor          4.1                         
year           2017                        
month          06                          
day            30                          
svn rev        72865                       
language       R                           
version.string R version 3.4.1 (2017-06-30)
nickname       Single Candle               
> 
> 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: y
installing the source packages ‘RGtk2’, ‘rattle’
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
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
* installing *source* package ‘RGtk2’ ...
** package ‘RGtk2’ successfully unpacked and MD5 sums checked
checking for pkg-config... no
checking for INTROSPECTION... no
checking for GTK... no
configure: error: GTK version 2.8.0 required
ERROR: configuration 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
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/1n/3vkxyt2j5c58wnq85_lsn24w0000gn/T/RtmpvykPQP/downloaded_packages’
> 

这是我尝试安装 RGTK2 时得到的:

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/1n/3vkxyt2j5c58wnq85_lsn24w0000gn/T/RtmpvykPQP/downloaded_packages’

RGtk2 于 2021 年 12 月退役,这使我无法安装 Rattle。我在 https://rattle.togaware.com/找到了解决方案。但是,我只在Windows上测试了它。


对于 Linux:

install.packages("https://cran.microsoft.com/snapshot/2021-12-15/src/contrib/RGtk2_2.20.36.2.tar.gz", repos=NULL(


对于窗口:

install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/windows/contrib/4.1/RGtk2_2.20.36.2.zip", repos=NULL(

<小时 />

对于 Mac:

install.packages("https://cran.microsoft.com/snapshot/2021-12-15/bin/macosx/contrib/4.1/RGtk2_2.20.36.2.tgz", repos=NULL(

我尝试了几种下载 rattle 包的方法,但只有以下方法有效!

试试install.packages("Cairo Device")

它应该随之安装拨浪鼓包。

当我以多种方式安装拨浪鼓软件包时,例如直接安装拨浪鼓和通过开罗设备安装拨浪鼓,我遇到了同样的错误。但现在已修复。我所做的只是以下内容:

我的 Mac 中有 3.4.3 版本。因此,我从Cran-R下载了R的3.3.3版本,刚刚运行了安装(没有任何其他更改(,然后重新启动了Mac。 当我推出R Studio时,Rattle就在那里。

PS:始终安装最新软件的 -1 版本,而不是在发布后立即升级到最新版本(除非绝对必要(。

相关内容

  • 没有找到相关文章

最新更新