为什么我不能下载tidycensus?

问题描述

当我尝试下载软件包 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:\Users\krosi\AppData\Local\Temp\RtmpI1FQMN\downloaded_packages
installing the source packages ‘lifecycle’,‘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,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:\Users\krosi\AppData\Local\Temp\RtmpI1FQMN\downloaded_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 并在干净的会话中重新安装包:您当前加载的包因此无法在较新的版本中重新加载。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...