简体   繁体   English

在r中安装“dplyr”的错误

[英]Errors installing “dplyr” in r

Question: unable to install dplyr in R... code below. 问题:无法在下面的R ...代码中安装dplyr。 Anyone offer any solutions? 有人提供任何解决方案 I'm on a mac osx sierra and R Version 1.0.136 我在mac osx sierra和R Version 1.0.136上

> 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’

Not sure why this isn't working! 不知道为什么这不起作用! Tried to download manually and it didn't work either (similar/same warnings/errors) 试图手动下载它也没有工作(类似/相同的警告/错误)

A new dplyr version was accepted into CRAN yesterday. 昨天,CRAN接受了一个新的dplyr版本。 Usually CRAN provides packages for both Windows and OSX in binary form, but it takes up to 48 hours for CRAN to provide the compiled packages. 通常CRAN以二进制形式提供Windows和OSX的软件包,但CRAN最多需要48小时才能提供已编译的软件包。

When you try to install a package in that time window, R asks you to either install the previous binary version or the new version from source. 当您尝试在该时间窗口中安装软件包时,R会要求您从源代码安装以前的二进制版本或新版本。 If you decide to install the version from source you will need to have a c++ compiler. 如果您决定从源代码安装该版本,则需要使用c ++编译器。

The easiest thing for you to do is to either install the previous binary package or wait until the latest version gets compiled at CRAN. 最简单的方法是安装以前的二进制包或等到最新版本在CRAN编译。

Checkout https://cran.r-project.org/web/packages/dplyr/index.html to see if the binaries for your OS are already available. 结帐https://cran.r-project.org/web/packages/dplyr/index.html查看您的操作系统的二进制文件是否已经可用。

Update: It seems there are some issues with the latest dplyr version, and the OSX compilation seems to fail. 更新:似乎最新的dplyr版本存在一些问题,OSX编译似乎失败了。 More info here: https://cran.r-project.org/web/checks/check_results_dplyr.html . 更多信息: https//cran.r-project.org/web/checks/check_results_dplyr.html I would rather stay with 0.5.0 until those issues are ironed out. 我宁愿坚持0.5.0,直到这些问题得到解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM