安装tmap r软件包ubuntu 18.04时出现问题

时间:2020-04-19 21:54:11

标签: ubuntu-18.04 tmap

我收到以下错误:

* installing *source* package ‘lwgeom’ ...
** package ‘lwgeom’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: pkg-config proj exists, will use it
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘lwgeom’

以前,我遵循以下规则:https://philmikejones.me/tutorials/2018-08-29-install-sf-ubuntu/

sf和rgdal的安装没有问题

我有另外三台具有相同操作系统的机器,以前从未遇到过此问题。

R版本:

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

1 个答案:

答案 0 :(得分:1)

我一直在寻找完全相同的问题,并且找到了解决方案:

  devtools::install_github("r-spatial/lwgeom")

出于我无法理解的原因,似乎CRAN版本与Ubuntu并不兼容,但是通过devtools安装它可以让我先安装lwgeom,然后再安装tmaptools,一点也不麻烦。希望对您有所帮助!