R - невозможно установить пакеты "tidyverse" - PullRequest
0 голосов
/ 26 марта 2020

Я попытался установить "tidyverse" (и многие другие пакеты), и это не сработало !! Я гуглил и прочитал кучу решений, которые люди давали для подобных проблем, и я попробовал их (например, перезагружаем R, Rstudio; go для инструмента> глобальный параметр и снимаем галочку с http; et c.), Но они этого не сделали тоже не работает. Ниже приведено то, что я вижу при попытке:

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("tidyverse")
also installing the dependencies ‘markdown’, ‘rlang’, ‘knitr’, ‘base64enc’, ‘tidyselect’, ‘Rcpp’, ‘isoband’, ‘vctrs’, ‘fs’, ‘rmarkdown’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘ggplot2’, ‘haven’, ‘hms’, ‘lubridate’, ‘modelr’, ‘reprex’, ‘tidyr’, ‘xml2’

Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘markdown’ ‘rlang’
  ‘base64enc’ ‘tidyselect’ ‘Rcpp’ ‘isoband’ ‘vctrs’ ‘fs’ ‘dplyr’ ‘haven’ ‘lubridate’ ‘tidyr’ ‘xml2’
Do you want to attempt to install these from sources? (Yes/no/cancel) yes
installing the source packages ‘markdown’, ‘rlang’, ‘knitr’, ‘base64enc’, ‘tidyselect’, ‘Rcpp’, ‘isoband’, ‘vctrs’, ‘fs’, ‘rmarkdown’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘ggplot2’, ‘haven’, ‘hms’, ‘lubridate’, ‘modelr’, ‘reprex’, ‘tidyr’, ‘xml2’, ‘tidyverse’

trying URL 'https://cran.rstudio.com/src/contrib/markdown_1.1.tar.gz'
Content type 'application/x-gzip' length 81050 bytes (79 KB)
==================================================
downloaded 79 KB

trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.5.tar.gz'
Content type 'application/x-gzip' length 816813 bytes (797 KB)
==================================================
downloaded 797 KB

trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.28.tar.gz'
Content type 'application/x-gzip' length 884866 bytes (864 KB)
==================================================
downloaded 864 KB

trying URL 'https://cran.rstudio.com/src/contrib/base64enc_0.1-3.tar.gz'
Content type 'application/x-gzip' length 7833 bytes
==================================================
downloaded 7833 bytes

trying URL 'https://cran.rstudio.com/src/contrib/tidyselect_1.0.0.tar.gz'
Content type 'application/x-gzip' length 151161 bytes (147 KB)
==================================================
downloaded 147 KB

trying URL 'https://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 'https://cran.rstudio.com/src/contrib/isoband_0.2.0.tar.gz'
Content type 'application/x-gzip' length 1894070 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/src/contrib/vctrs_0.2.4.tar.gz'
Content type 'application/x-gzip' length 787455 bytes (768 KB)
==================================================
downloaded 768 KB

trying URL 'https://cran.rstudio.com/src/contrib/fs_1.3.2.tar.gz'
Content type 'application/x-gzip' length 820272 bytes (801 KB)
==================================================
downloaded 801 KB

trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.1.tar.gz'
Content type 'application/x-gzip' length 3186382 bytes (3.0 MB)
==================================================
downloaded 3.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/broom_0.5.5.tar.gz'
Content type 'application/x-gzip' length 1223871 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/src/contrib/dbplyr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 303397 bytes (296 KB)
==================================================
downloaded 296 KB

trying URL 'https://cran.rstudio.com/src/contrib/dplyr_0.8.5.tar.gz'
Content type 'application/x-gzip' length 1378766 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.0.tar.gz'
Content type 'application/x-gzip' length 3031461 bytes (2.9 MB)
==================================================
downloaded 2.9 MB

trying URL 'https://cran.rstudio.com/src/contrib/haven_2.2.0.tar.gz'
Content type 'application/x-gzip' length 272575 bytes (266 KB)
==================================================
downloaded 266 KB

trying URL 'https://cran.rstudio.com/src/contrib/hms_0.5.3.tar.gz'
Content type 'application/x-gzip' length 134669 bytes (131 KB)
==================================================
downloaded 131 KB

trying URL 'https://cran.rstudio.com/src/contrib/lubridate_1.7.4.tar.gz'
Content type 'application/x-gzip' length 449850 bytes (439 KB)
==================================================
downloaded 439 KB

trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.6.tar.gz'
Content type 'application/x-gzip' length 121295 bytes (118 KB)
==================================================
downloaded 118 KB

trying URL 'https://cran.rstudio.com/src/contrib/reprex_0.3.0.tar.gz'
Content type 'application/x-gzip' length 1052597 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/tidyr_1.0.2.tar.gz'
Content type 'application/x-gzip' length 812005 bytes (792 KB)
==================================================
downloaded 792 KB

trying URL 'https://cran.rstudio.com/src/contrib/xml2_1.2.5.tar.gz'
Content type 'application/x-gzip' length 273448 bytes (267 KB)
==================================================
downloaded 267 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.0.tar.gz'
Content type 'application/x-gzip' length 712837 bytes (696 KB)
==================================================
downloaded 696 KB

* installing *source* package ‘markdown’ ...
** package ‘markdown’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c Rbase64.c -o Rbase64.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from Rbase64.c:1:
In file included from ./Rmarkdown.h:14:
/Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
          ^~~~~~~~~~
1 error generated.
make: *** [Rbase64.o] Error 1
ERROR: compilation failed for package ‘markdown’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/markdown’
Warning in install.packages :
  installation of package ‘markdown’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./lib/  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c capture.c -o capture.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from capture.c:1:
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:39:11: fatal error: 'stdio.h' file not found
# include <stdio.h>
          ^~~~~~~~~
1 error generated.
make: *** [capture.o] Error 1
ERROR: compilation failed for package ‘rlang’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rlang’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rlang’
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘base64enc’ ...
** package ‘base64enc’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c base64.c -o base64.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from base64.c:86:
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:39:11: fatal error: 'stdio.h' file not found
# include <stdio.h>
          ^~~~~~~~~
1 error generated.
make: *** [base64.o] Error 1
ERROR: compilation failed for package ‘base64enc’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/base64enc’
Warning in install.packages :
  installation of package ‘base64enc’ had non-zero exit status
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c api.cpp -o api.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:29:
In file included from ../inst/include/Rcpp/r/headers.h:67:
In file included from ../inst/include/Rcpp/platform/compiler.h:100:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:305:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found
#include_next <math.h>
              ^~~~~~~~
1 error generated.
make: *** [api.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp’
Warning in install.packages :
  installation of package ‘Rcpp’ had non-zero exit status
ERROR: dependency ‘markdown’ is not available for package ‘knitr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/knitr’
Warning in install.packages :
  installation of package ‘knitr’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘isoband’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/isoband’
Warning in install.packages :
  installation of package ‘isoband’ had non-zero exit status
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c altrep-rle.c -o altrep-rle.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from altrep-rle.c:1:
In file included from ./vctrs.h:6:
/Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
          ^~~~~~~~~~
1 error generated.
make: *** [altrep-rle.o] Error 1
ERROR: compilation failed for package ‘vctrs’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/vctrs’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/vctrs’
Warning in install.packages :
  installation of package ‘vctrs’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘fs’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/fs’
Warning in install.packages :
  installation of package ‘fs’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘lubridate’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/lubridate’
Warning in install.packages :
  installation of package ‘lubridate’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘xml2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/xml2’
Warning in install.packages :
  installation of package ‘xml2’ had non-zero exit status
* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘rlang’ 0.4.1 is being loaded, but >= 0.4.3 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyselect’
Warning in install.packages :
  installation of package ‘tidyselect’ had non-zero exit status
ERROR: dependencies ‘knitr’, ‘base64enc’ are not available for package ‘rmarkdown’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown’
Warning in install.packages :
  installation of package ‘rmarkdown’ had non-zero exit status
ERROR: dependency ‘isoband’ is not available for package ‘ggplot2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status
* installing *source* package ‘hms’ ...
** package ‘hms’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘vctrs’ 0.2.0 is being loaded, but >= 0.2.1 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘hms’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/hms’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/hms’
Warning in install.packages :
  installation of package ‘hms’ had non-zero exit status
ERROR: dependencies ‘Rcpp’, ‘tidyselect’ are not available for package ‘dplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status
ERROR: dependencies ‘Rcpp’, ‘tidyselect’ are not available for package ‘haven’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/haven’
Warning in install.packages :
  installation of package ‘haven’ had non-zero exit status
ERROR: dependencies ‘fs’, ‘rmarkdown’ are not available for package ‘reprex’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reprex’
Warning in install.packages :
  installation of package ‘reprex’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘tidyselect’ are not available for package ‘dbplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dbplyr’
Warning in install.packages :
  installation of package ‘dbplyr’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘Rcpp’, ‘tidyselect’ are not available for package ‘tidyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyr’
Warning in install.packages :
  installation of package ‘tidyr’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘tidyr’ are not available for package ‘broom’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/broom’
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dplyr’, ‘tidyr’, ‘tidyselect’ are not available for package ‘modelr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/modelr’
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dbplyr’, ‘dplyr’, ‘ggplot2’, ‘haven’, ‘lubridate’, ‘modelr’, ‘reprex’, ‘tidyr’, ‘xml2’ are not available for package ‘tidyverse’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/y7/cg5_y20s33s9cj5y74v3rzc00000gs/T/RtmpOLLsiu/downloaded_packages’
...