【问题标题】:Why can't I download tidycensus?为什么我不能下载 tidycensus?
【发布时间】:2021-05-27 23:05:55
【问题描述】:

当我尝试下载包 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’, ‘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:\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 tidycensus


    【解决方案1】:

    重新启动 R 并在干净的会话中重新安装包:您当前已加载包,因此无法在较新版本中重新加载。

    【讨论】:

    • 另外我建议升级到最近的 4.x 版本的 R.
    • 我错过了——是的,OP 应该肯定升级 R。3.5 已经过时了。大多数软件包将不再支持此版本的 R(如果它们仍然有效,这只是偶然)。
    猜你喜欢
    • 2022-01-10
    • 1970-01-01
    • 1970-01-01
    • 2014-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-11
    相关资源
    最近更新 更多