【问题标题】:Trying to install Rattle for R on my Mac尝试在我的 Mac 上安装 Rattle for R
【发布时间】:2018-04-06 10:46:21
【问题描述】:

我正在尝试安装 Rattle,但遇到了一些问题。下面是初始代码和结果。

install.packages('rattle', repo='https://cran.cnr.Berkeley.edu/')

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?

我试过了,它给我的错误是这样的

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/47/39zt_y995czg2rgb3n485ty80000gn/T/Rtmpb8Eli0/downloaded_packages’

我也试过了,它给我的错误是这样的

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/47/39zt_y995czg2rgb3n485ty80000gn/T/Rtmpb8Eli0/downloaded_packages’

会有人碰巧知道我哪里出错了吗?提前感谢您的任何意见。

【问题讨论】:

  • 我已经写了一个简短的说明。希望对你有帮助:gist.github.com/zhiyzuo/a489ffdcc5da87f28f8589a55aa206dd
  • @Zhiya,在文档中安装后,我是否可以相应地访问 RStudio 中的拨浪鼓
  • @EB 我已经帮助一些人做到了这一点,其中一些人无法在 RStudio 中访问嘎嘎声,说 GTK+ 未初始化,但其他人可以,所以我不确定。您可以尝试打开 XQuartz,然后打开 RStudio 并运行嘎嘎声。
  • @Zhiya,我可以访问它并且它正在工作.. 但它有时比预期的要慢

标签: r rstudio rattle


【解决方案1】:

我的声誉太低,无法发表评论,所以我必须发布答案。智雅的方法对我的一些学生有效。它并不适合所有人,所以我们制定了第二种方法(感谢 Tugay!)

GW 的包装方法也不起作用,可能是因为它编译后一些版本发生了变化。 (我的理论是,以下所有版本都必须具有可以互操作的版本:R、RGtk+、GTK、MacOS、Rattle。当我的系统上更新它们中的任何一个时,Rattle 可能会停止工作。这就是您收到此消息的原因

配置:错误:需要 GTK 版本 2.8.0

记录对我有用的博客文章是here。它适用于:MacOS 10.13.4、R 3.4.4、Rattle 5.1.3、RGtk2 2.24.32。 YMMV。

我确信,如果我了解一些 UNIX,我也可以使用其他方法。同样,明显的问题是,截至今天,还没有为最新的 MacOS 编译的最新版本的 RGtk2 和 GTK。适用于 Windows 的编译版本确实存在,并且位于 CRAN 存储库中。解决错误消息需要从 CRAN 上的源代码版本编译缺少的程序。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-27
    • 2019-05-22
    • 2013-12-03
    相关资源
    最近更新 更多