[英]Unable to install any packages in R-Studio
我在macos Yosemite Version 10.10.5
版本 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'
提前非常感謝。
您需要安裝命令行開發人員工具。 啟動您的終端並執行以下操作:
xcode-select --install
然后重試安裝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.