"pkg-config proj --libs" 中没有路径 - "proj_api.h not found in standard or given locations" 的已知问题

No path in "pkg-config proj --libs" - Known problem of "proj_api.h not found in standard or given locations"

不知道为什么会这样:pkg-config proj --libs

给出:-lproj

应该是:-L/usr/lib/x86_64-linux-gnu -lproj

因为 proj.pc/usr/lib/x86_64-linux-gnu/pkgconfig/

现在,这个问题与 proj_api.h not found in standard or given locations 有关吗?我的 LMint 20.1 没有发现。我不断收到:

PROJ header location specified: -I/usr/include - check if proj_api.h is there...
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: Did not find PROJ headers according to --with-proj-include - check the installation!

尽管 proj_api.h 在这里:

$ locate proj_api.h
/usr/include/proj_api.h

这是 PROJ4 版本 7.2.1-1 的问题吗?我找到了一些关于此的帖子(例如 this one about PKG_CONFIG_PATH in .bashrc),但没有找到解决方案。非常感谢任何帮助,

-- PROJ4 版本:

ii  libproj-dev:amd64                          7.2.1-1~focal0                        amd64        Cartographic projection library (development files)
ii  libproj19:amd64                            7.2.1-1~focal0                        amd64        Cartographic projection library
ii  proj-bin                                   7.2.1-1~focal0                        amd64        Cartographic projection library (tools)
ii  proj-data                                  7.2.1-1~focal0                        all          Cartographic projection filter and library (datum package)

找到了,解决办法是在configure调用前加上ACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1,像这样:

sudo CFLAGS="-I/usr/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1" ./configure --prefix=/home/gery/misProgramas/mb/mbsystem-trunk.r2346 --with-gmt-config=/home/gery/misProgramas/gmt/gmt-5.4.4/bin --with-otps-dir=/home/gery/misProgramas/mb/OTPS2

这些链接可能有用:https://github.com/postgis/postgis/pull/354/files# and https://github.com/OSGeo/PROJ/issues/836