【问题标题】:No path in "pkg-config proj --libs" - Known problem of "proj_api.h not found in standard or given locations"“pkg-config proj --libs”中没有路径 - “proj_api.h 在标准或给定位置找不到”的已知问题
【发布时间】:2021-05-20 00:52:56
【问题描述】:

不知道为什么: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)

【问题讨论】:

    标签: linux linux-mint proj


    【解决方案1】:

    找到了,解决方法是在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#https://github.com/OSGeo/PROJ/issues/836

    【讨论】:

      猜你喜欢
      • 2019-08-10
      • 2020-07-27
      • 2021-04-06
      • 1970-01-01
      • 2016-11-07
      • 2013-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多