无法在R-Studio中安装任何软件包

问题描述 投票:1回答:1

我正在 version 1.1.463上运行 Yosemite Version 10.10.5。我的笔记本电脑来自2015年初。每当我尝试在R-Studio中安装任何软件包时,都会出现此错误消息:

抱歉,我是一个完整的n00b,但是我不确定这是否意味着软件包确实已下载。如果安装了它们,我在哪里可以找到它们,以及如何将它们安装在R-Studio中?我没有C编译器,并且不确定我需要一个。

    =============================================

    install.packages('reshape')
    also installing the dependencies ‘Rcpp’, ‘plyr’

    Warning in install.packages :
      unable to access index for repository http://cran.rstudio.com/bin/macosx/contrib/3.2
    Packages which are only available in source form, and may need compilation
      of C/C++/Fortran: ‘Rcpp’ ‘plyr’ ‘reshape’
    Do you want to attempt to install these from sources?
    y/n: y
    installing the source packages ‘Rcpp’, ‘plyr’, ‘reshape’

    trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_1.0.4.tar.gz'
    Content type 'application/x-gzip' length 2750216 bytes (2.6 MB)
    ==================================================
    downloaded 2.6 MB

    trying URL 'http://cran.rstudio.com/src/contrib/plyr_1.8.6.tar.gz'
    Content type 'application/x-gzip' length 401191 bytes (391 KB)
    ==================================================
    downloaded 391 KB

    trying URL 'http://cran.rstudio.com/src/contrib/reshape_0.8.8.tar.gz'
    Content type 'application/x-gzip' length 42558 bytes (41 KB)
    ==================================================
    downloaded 41 KB

    * installing *source* package ‘Rcpp’ ...
    ** package ‘Rcpp’ successfully unpacked and MD5 sums checked
    ** libs
    xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the
dialog to download the command line developer tools.
    ERROR: compilation failed for package ‘Rcpp’
    * removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/Rcpp’
    Warning in install.packages :
      installation of package ‘Rcpp’ had non-zero exit status
    ERROR: dependency ‘Rcpp’ is not available for package ‘plyr’
    * removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/plyr’
    Warning in install.packages :
      installation of package ‘plyr’ had non-zero exit status
    ERROR: dependency ‘plyr’ is not available for package ‘reshape’
    * removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/reshape’
    Warning in install.packages :
      installation of package ‘reshape’ had non-zero exit status

    The downloaded source packages are in
      ‘/private/var/folders/zp/18zxxbcs5cncbn98lr6zcptc0000gn/T/RtmpQ6Hg59/downloaded_packages’

非常感谢。

r macos install.packages
1个回答
0
投票
  • 请注意错误:“在以下位置未找到开发人员工具'/Applications/Xcode.app',请求安装。“
© www.soinside.com 2019 - 2024. All rights reserved.