centos7 安装gdal2.3.1

在直接源码安装gdal2.3时报错,大概意思是说没有安装SFCGAL。

 

1、centos更新cmake到3.5版本:

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

至此,更新完成。

 

2、重新安装MPFR和Boost:

重新安装MPFR:

# mpfr下载地址  https://www.mpfr.org/mpfr-current/#download
unzip mpfr-4.0.1.zip
cd mpfr-4.0.1
make 
make install

重新安装Boost:

# 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

 

3、安装CGAL

# CGAL下载地址: https://github.com/CGAL/cgal/releases
unzip CGAL-4.11.2.zip
cd CGAL-4.11.2
cmake .
make
make install

 

4、安装SFCGAL

# 下载地址: 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成功了。

 

5、安装gdal

# 下载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安装成功了。

posted @ 2018-07-11 13:30  Echo_fy  阅读(1257)  评论(0编辑  收藏  举报