当我尝试下载包tidycensus
时,我得到以下错误:
> install.packages("tidycensus")
Installing package into ‘C:/Users/krosi/OneDrive/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ellipsis’, ‘lifecycle’, ‘tidyselect’, ‘vctrs’, ‘pillar’, ‘dplyr’, ‘rlang’
There are binary versions available but the source versions are later:
binary source needs_compilation
ellipsis 0.3.0 0.3.2 TRUE
lifecycle 0.2.0 1.0.0 FALSE
tidyselect 1.0.0 1.1.1 TRUE
vctrs 0.2.4 0.3.8 TRUE
pillar 1.4.3 1.6.1 FALSE
dplyr 0.8.5 1.0.6 TRUE
rlang 0.4.5 0.4.11 TRUE
tidycensus 0.9.9.2 1.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/ellipsis_0.3.0.zip'
Content type 'application/zip' length 44220 bytes (43 KB)
downloaded 43 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyselect_1.0.0.zip'
Content type 'application/zip' length 242507 bytes (236 KB)
downloaded 236 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vctrs_0.2.4.zip'
Content type 'application/zip' length 1018801 bytes (994 KB)
downloaded 994 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/dplyr_0.8.5.zip'
Content type 'application/zip' length 3256479 bytes (3.1 MB)
downloaded 3.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:UserskrosiAppDataLocalTempRtmpI1FQMNdownloaded_packages
installing the source packages ‘lifecycle’, ‘pillar’, ‘tidycensus’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.0.tar.gz'
Content type 'application/x-gzip' length 83389 bytes (81 KB)
downloaded 81 KB
trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.6.1.tar.gz'
Content type 'application/x-gzip' length 1111747 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/src/contrib/tidycensus_1.0.tar.gz'
Content type 'application/x-gzip' length 2115609 bytes (2.0 MB)
downloaded 2.0 MB
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** 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.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/krosi/OneDrive/Documents/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'tidycensus' ...
** package 'tidycensus' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'dplyr' 0.8.5 is being loaded, but >= 1.0.0 is required
ERROR: lazy loading failed for package 'tidycensus'
* removing 'C:/Users/krosi/OneDrive/Documents/R/win-library/3.5/tidycensus'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tidycensus’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'pillar'
* removing 'C:/Users/krosi/OneDrive/Documents/R/win-library/3.5/pillar'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
The downloaded source packages are in
‘C:UserskrosiAppDataLocalTempRtmpI1FQMNdownloaded_packages’
这是我的sessioninfo
:
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.1 assertthat_0.2.1 Matrix_1.2-14 cli_2.0.2 tools_3.5.1 glue_1.4.0 rstudioapi_0.11 yaml_2.2.0 crayon_1.3.4
[10] fansi_0.4.0 grid_3.5.1 lattice_0.20-35
有什么想法吗?
重新启动R并在干净的会话中重新安装程序包:您当前已加载程序包,因此无法在新版本中重新加载。