安裝PostGIS 2.1.1 時遇到checking for library containing GDALAllRegister... no
阿新 • • 發佈:2018-11-21
在postgis中執行./configure時,遇到 checking for library containing GDALAllRegister... no 的錯誤資訊
[[email protected] postgis-2.1.1]# ./configure
...
...
...
checking for library containing GDALAllRegister... no
configure: error: could not find GDAL
解決辦法:將PostgreSQL的lib目錄(/postgresql/lib)和GDAL的lib檔案目錄(/usr/local/lib)新增到系統的庫檔案目錄中
echo '/postgresql/lib' >> /etc/ld.so.conf
echo '/usr/local/lib' >> /etc/ld.so.conf
ldconfig
檢查是否生效
[ [email protected] postgis-2.1.1]# ldconfig -p | grep libpq
libpqwalreceiver.so (libc6,x86-64) => /postgresql/lib/libpqwalreceiver.so
libpq.so.5 (libc6,x86-64) => /postgresql/lib/libpq.so.5
libpq.so (libc6,x86-64) => /postgresql/lib/libpq.so
[[email protected]
libgdal.so.1 (libc6,x86-64) => /usr/local/lib/libgdal.so.1
libgdal.so (libc6,x86-64) => /usr/local/lib/libgdal.so
再執行./configure就正常了。