无法安装tmap

时间:2020-08-29 11:18:07

标签: r tmap

试图安装tmap软件包,但遇到以下错误

install.packages("tmap")
also installing the dependencies ‘tmaptools’, ‘sf’, ‘stars’, ‘classInt’


There are binary versions available but the source versions are later:
          binary source needs_compilation
tmaptools  2.0-2    3.1             FALSE
sf         0.8-1  0.9-5              TRUE
stars      0.4-0  0.4-3             FALSE
classInt   0.4-2  0.4-3              TRUE
tmap       2.3-2    3.1             FALSE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) no
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/sf_0.8-1.tgz'
Content type 'application/x-gzip' length 53770407 bytes (51.3 MB)
==================================================
downloaded 51.3 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/classInt_0.4-2.tgz'
Content type 'application/x-gzip' length 77560 bytes (75 KB)
==================================================
downloaded 75 KB


The downloaded binary packages are in
    /var/folders/60/16nrd6w13g33nq3dpr441mgc0000gn/T//RtmphtcoT4/downloaded_packages
installing the source packages ‘tmaptools’, ‘stars’, ‘tmap’

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

trying URL 'https://cran.rstudio.com/src/contrib/stars_0.4-3.tar.gz'
Content type 'application/x-gzip' length 4745035 bytes (4.5 MB)
==================================================
downloaded 4.5 MB

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

* installing *source* package ‘stars’ ...
** package ‘stars’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error : package ‘sf’ 0.8.1 was found, but >= 0.9.0 is required by ‘stars’
ERROR: lazy loading failed for package ‘stars’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/stars’
Warning in install.packages :
  installation of package ‘stars’ had non-zero exit status
ERROR: dependency ‘stars’ is not available for package ‘tmaptools’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tmaptools’
Warning in install.packages :
  installation of package ‘tmaptools’ had non-zero exit status
ERROR: dependencies ‘tmaptools’, ‘stars’ are not available for package ‘tmap’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/tmap’
Warning in install.packages :
  installation of package ‘tmap’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/60/16nrd6w13g33nq3dpr441mgc0000gn/T/RtmphtcoT4/downloaded_packages’

1 个答案:

答案 0 :(得分:0)

将R重新安装到最新版本即可解决问题