无法在R 3.2.1中安装dplyr

时间:2019-05-28 21:59:14

标签: r dplyr

我无法安装dplyr。尝试安装后,我得到以下答案

  There are binary versions available but the source versions are later:
          binary source needs_compilation
backports  1.0.3  1.1.4             FALSE
Rcpp      0.12.6  1.0.1              TRUE
tibble       1.1  2.1.1              TRUE
dplyr      0.5.0  0.8.1              TRUE

  Binaries will be installed
Packages which are only available in source form, and may need compilation of
  C/C++/Fortran: ‘utf8’ ‘vctrs’ ‘fansi’ ‘glue’ ‘rlang’ ‘tidyselect’
  These will not be installed
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2651k  100 2651k    0     0   464k      0  0:00:05  0:00:05 --:--:--  529k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  165k  100  165k    0     0   188k      0 --:--:-- --:--:-- --:--:--  233k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3722k  100 3722k    0     0   613k      0  0:00:06  0:00:06 --:--:--  732k

The downloaded binary packages are in
    /var/folders/np/f2p1wtb97f9_b_y_x0m1s60w0000gn/T//Rtmpm572i3/downloaded_packages
installing the source packages ‘backports’, ‘pillar’

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13859  100 13859    0     0  37534      0 --:--:-- --:--:-- --:--:-- 70350
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  223k  100  223k    0     0   202k      0  0:00:01  0:00:01 --:--:--  242k
* installing *source* package ‘backports’ ...
** package ‘backports’ successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package ‘backports’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/backports’
Warning in install.packages :
  installation of package ‘backports’ had non-zero exit status
ERROR: dependencies ‘fansi’, ‘rlang’, ‘utf8’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/pillar’
Warning in install.packages :
  installation of package ‘pillar’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/np/f2p1wtb97f9_b_y_x0m1s60w0000gn/T/Rtmpm572i3/downloaded_packages’

我的会话信息:

R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.8.5 (Mountain Lion)

locale:
[1] es_ES.UTF-8/es_ES.UTF-8/es_ES.UTF-8/C/es_ES.UTF-8/es_ES.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] remotes_2.0.4

loaded via a namespace (and not attached):
[1] httr_1.4.0     R6_2.4.0       tools_3.2.1    RCurl_1.95-4.8 digest_0.6.10  bitops_1.0-6

1 个答案:

答案 0 :(得分:0)

不客气,这将很难。正如评论所建议的那样,如果可能的话,最简单的方法就是将R版本更新为当前版本或接近当前版本。

从理论上讲,可以在非常老的OS上为较旧版本的R /编译/安装R和软件包,但是在实践中会很快变得困难。最好的选择是看是否可以安装开发工具from here(这可能有点困难,因为该信息并不总是适用/对于旧的OS版本仍然是最新的。)

R版本可能比操作系统更大的障碍; CRAN provides binaries for OS >= 10.6。但是:

  • 旧版本的R不提供二进制文件
  • 新软件包可能明确地依赖于R的较新版本。

如果无法使用开发工具,则可以尝试使用snapshot package来使用MRAN "time machine"(CRAN以前实例的镜像)-它可以追溯到2014年9月。但是,这不会发生R版本为当前版本后首次发布的所有软件包的二进制文件,其中包括您要安装的大多数tidyverse软件包...