問題:無法在下面的R ...代碼中安裝dplyr。任何人都可以提供任 我在Mac OSX上塞拉利昂和R版本1.0.136在r中安裝「dplyr」時出錯
> install.packages("dplyr")
There is a binary version available but the source version
is later:
binary source needs_compilation
dplyr 0.5.0 0.7.0 TRUE
Do you want to install from sources the package which needs compilation?
y/n:
y
installing the source package ‘dplyr’
trying URL 'https://cran.rstudio.com/src/contrib/dplyr_0.7.0.tar.gz'
Content type 'application/x-gzip' length 690938 bytes (674 KB)
==================================================
downloaded 674 KB
* installing *source* package ‘dplyr’ ...
** package ‘dplyr’ successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘dplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/dplyr’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/dplyr’
Warning in install.packages :
installation of package ‘dplyr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/ll/6vx1dr1n5bb9zwbv1z9v53z00000gn/T/RtmpitMpQn/downloaded_packages’
> library(dplyr)
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘DBI’
不知道爲什麼這是行不通的!試圖手動下載,它也沒有工作(類似/相同的警告/錯誤)
你確定這是你的R版嗎? R 1.2在2001年推出。當前版本是3.4 – Gregor
另外,當你看到*「在包中沒有包含'DBI'」*的錯誤時,假設你嘗試過'install.packages(「DBI」)是安全的。 ',它仍然不起作用? – Gregor
你有沒有試過回答'n'到「你想從源代碼安裝需要編譯的軟件包嗎?」還是你需要(全新)0.7.0版本? –