【发布时间】:2020-04-05 14:59:33
【问题描述】:
我在 macos Yosemite Version 10.10.5 上运行 r-studio version 1.1.463。我的笔记本电脑是 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.version.string 是什么?
-
或许可以考虑询问:community.rstudio.com
-
尝试将 R 更新到 3.6。和 RStudio 到 1.2.5
-
如果你运行:
library(reshape)会发生什么?如果您没有收到错误消息,则说明它已正确安装。 -
R 版本 3.2.1 (2015-06-18)
标签: r-studio macos r macos install.packages