解决:安装proj,官网:https://proj.org/download.html
下载
# wget -c -P /storage/software/gdal-related-libs https://download.osgeo.org/proj/proj-8.1.0.tar.gz
解压
# tar xvf proj-8.1.0.tar.gz
进入解压目录
# cd /storage/software/gdal-related-libs/proj-8.1.0
配置
# ./configure
编译
# make
# make check
# make install
错误汇总:
libtiff-4 未安装
过程中,./configure
报错:
checking for TIFF... configure: error: Package requirements (libtiff-4) were not met:
Package 'libtiff-4', required by 'virtual:world', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables TIFF_CFLAGS
and TIFF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
解决:
# yum install -y libtiff libtiff-devel.x86_64
make check报错:
test_network.cpp:1229: Failure
Expected equality of these values:
c.xyz.x
Which is: 40
(__builtin_huge_val ())
Which is: inf
[ FAILED ] networking.network_endpoint_env_variable (19 ms)
[ RUN ] networking.network_endpoint_api
Unrecognized horizontal grid format
Unrecognized horizontal grid format
test_network.cpp:1257: Failure
Expected equality of these values:
c.xyz.x
Which is: 40
(__builtin_huge_val ())
Which is: inf
[ FAILED ] networking.network_endpoint_api (12 ms)
[ RUN ] networking.cache_basic
[ OK ] networking.cache_basic (774 ms)
[ RUN ] networking.proj_grid_cache_clear
proj_create: Error 1029 (File not found or invalid): pipeline: Pipeline: Bad step definition: proj=hgridshift (File not found or invalid)
test_network.cpp:1369: Failure
Expected: (P) != (nullptr), actual: NULL vs (nullptr)
[ FAILED ] networking.proj_grid_cache_clear (300174 ms)
[ RUN ] networking.cache_saturation
[ OK ] networking.cache_saturation (2407 ms)
[ RUN ] networking.cache_ttl
[ OK ] networking.cache_ttl (2695 ms)
[ RUN ] networking.cache_lock
[ OK ] networking.cache_lock (5140 ms)
[ RUN ] networking.download_whole_files
[ OK ] networking.download_whole_files (22383 ms)
[ RUN ] networking.file_api
[ OK ] networking.file_api (3428 ms)
[----------] 20 tests from networking (348886 ms total)
[----------] Global test environment tear-down
[==========] 20 tests from 1 test case ran. (348886 ms total)
[ PASSED ] 17 tests.
[ FAILED ] 3 tests, listed below:
[ FAILED ] networking.network_endpoint_env_variable
[ FAILED ] networking.network_endpoint_api
[ FAILED ] networking.proj_grid_cache_clear
3 FAILED TESTS
make[5]: *** [Makefile:932: test_network-check] Error 1
make[5]: Leaving directory '/storage/software/gdal-related-libs/proj-8.1.0/test/unit'
make[4]: *** [Makefile:743: check-am] Error 2
make[4]: Leaving directory '/storage/software/gdal-related-libs/proj-8.1.0/test/unit'
make[3]: *** [Makefile:386: check-recursive] Error 1
make[3]: Leaving directory '/storage/software/gdal-related-libs/proj-8.1.0/test'
make[2]: *** [Makefile:908: check-local] Error 2
make[2]: Leaving directory '/storage/software/gdal-related-libs/proj-8.1.0'
make[1]: *** [Makefile:776: check-am] Error 2
make[1]: Leaving directory '/storage/software/gdal-related-libs/proj-8.1.0'
make: *** [Makefile:486: check-recursive] Error 1
无视了,直接make install
过程中出现需要安装Sqlite3,可以参考:https://blog.csdn.net/dikcychen2011/article/details/21969357
其他错误汇总参考:Proj之编译、安装 - 掘金 (juejin.cn)
网友评论