我在r-studio version 1.1.463
上运行macos 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’
非常感谢。
答案 0 :(得分:0)
您需要安装命令行开发人员工具。启动您的终端并执行:
xcode-select --install
然后重试安装。