r-spatial / lwgeom

bindings to the liblwgeom library
https://r-spatial.github.io/lwgeom/
58 stars 23 forks source link

ERROR: configuration failed for package ‘lwgeom’ UBUNTU 18.04 #56

Closed nmolanog closed 4 years ago

nmolanog commented 4 years ago

See this tread please https://stackoverflow.com/questions/61312125/problem-installing-tmap-r-package-ubuntu-18-04

it seems that CRAN version doesn't get along with Ubuntu

edzer commented 4 years ago

The answer is there.

barryrowlingson commented 4 years ago

Grrr. If this issue had actually used the text of the error message here rather than linking to an SO question I would have found it and not just wasted twenty minutes writing a new issue and only discovering this issue at the last minute before hitting submit!!

Seems this is still a problem with the current CRAN version (2020-05-12) so I'm surprised its not hitting more people - oh, only we oldies compile from source now, right? Anyway, some search engine fodder follows so the next person can catch it...

configure: error: proj_api.h not found in standard or given locations.

Ubuntu 18.04

Fix by installing latest from github: devtools::install_github("r-spatial/lwgeom") until CRAN version updated.

* 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’