无法安装tmap

时间:2020-04-15 16:18:58

标签: sf install.packages tmap

当我尝试安装tmap时:

install.packages("tmap")

我有以下错误:

also installing the dependencies ‘tmaptools’, ‘sf’


  There are binary versions available but the source versions are later:
     binary source needs_compilation
sf    0.9-0  0.9-2              TRUE
tmap  2.3-2    3.0             FALSE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tmaptools_3.0.zip'
Content type 'application/zip' length 178880 bytes (174 KB)
downloaded 174 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/sf_0.9-0.zip'
Content type 'application/zip' length 39675549 bytes (37.8 MB)
downloaded 37.8 MB

package ‘tmaptools’ successfully unpacked and MD5 sums checked
package ‘sf’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Marine\AppData\Local\Temp\RtmpSQF9EP\downloaded_packages
installing the source package ‘tmap’

trying URL 'https://cran.rstudio.com/src/contrib/tmap_3.0.tar.gz'
Content type 'application/x-gzip' length 2936348 bytes (2.8 MB)
downloaded 2.8 MB

* installing *source* package 'tmap' ...
** package 'tmap' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'sf' 0.9-0 is being loaded, but = 0.9.1 is required
Calls: <Anonymous ... withCallingHandlers - loadNamespace - namespaceImport - loadNamespace
Exécution arrêtée
ERROR: lazy loading failed for package 'tmap'
* removing 'C:/Program Files/R/R-3.6.3/library/tmap'
Warning in install.packages :
  installation of package ‘tmap’ had non-zero exit status

所以我想这是SF版本的问题,但是当我尝试独立安装SF时,它是0.9-0版本。我安装了该软件,但无法按要求安装0.9.1或更高版本。

有什么技巧可以解决这个问题?

谢谢!

PS:我使用的是R版本3.6.3

0 个答案:

没有答案