在直接源碼安裝gdal2.3時報錯,大概意思是說沒有安裝SFCGAL。html
一、centos更新cmake到3.5版本:git
wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz tar xvf cmake-3.5.2.tar.gz cd cmake-3.5.2 ./bootstrap --prefix=/usr (這一步很關鍵,若是沒有指定prefix,後面使用時會報錯Could not find CMAKE_ROOT) gmake
sudo gmake install
至此,更新完成。github
二、從新安裝MPFR和Boost:bootstrap
從新安裝MPFR:centos
# mpfr下載地址 https://www.mpfr.org/mpfr-current/#download unzip mpfr-4.0.1.zip cd mpfr-4.0.1 make make install
從新安裝Boost:spa
# Boost下載地址: https://dl.bintray.com/boostorg/release/1.67.0/source/ tar -xvf boost_1_67_0.tar.gz cd boost_1_67_0 ./bootstrap.sh ./b2 ./b2 install
三、安裝CGALcode
# CGAL下載地址: https://github.com/CGAL/cgal/releases unzip CGAL-4.11.2.zip cd CGAL-4.11.2 cmake . make make install
四、安裝SFCGALhtm
# 下載地址: https://oslandia.github.io/SFCGAL/installation.html
# https://github.com/Oslandia/SFCGAL/releases
unzip SFCGAL-1.3.5.zip cd SFCGAL-1.3.5 cmake . make make install
1.3.0這裏又失敗了,不知道爲何,可是1.3.5成功了。blog
五、安裝gdalip
# 下載gdal2.3.1:http://download.osgeo.org/gdal/2.3.1/ tar -xvf gdal-2.3.1.tar.gz cd gdal-2.3.1 sudo ./configure make sudo make install
至此,終於gdal安裝成功了。