-
一、安装sqlite3
- wget https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz #下载库
- tar xvfz sqlite-autoconf-3360000.tar.gz #解压
- cd sqlite-autoconf-3360000 #进入该库的目录
- ./configure #编译
- make
- make install
- sqlite3 --version #检查是否已安装
-
二、安装pkg-config
- wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
- tar -zxvf pkg-config-0.29.2.tar.gz
- cd pkg-config-0.29.2
- /configure --with-internal-glib
- make
- make install
- pkg-config --version
-
三、安装proj6
- wget https://download.osgeo.org/proj/proj-6.3.2.tar.gz
- tar -zxvf proj-6.3.2.tar.gz
- cd proj-6.3.2
- ./configure
- make
- make install
- proj --version
-
四、安装geos
- wget http://download.osgeo.org/geos/geos-3.8.1.tar.bz2
- tar -jxvf geos-3.8.1.tar.bz2
- cd geos-3.8.1
- ./configure
- make
- make install
- geos-config --version
-
五、安装gdal
-
安装gdal
- wget http://download.osgeo.org/gdal/3.1.2/gdal-3.1.2.tar.gz
- tar -zxvf gdal-3.1.2.tar.gz
- cd gdal-3.1.2
- ./configure --with-python --with-geos=/usr/local/bin/geos-config
- make
- make install
- gdal –version
-
安装gdal python库
- cd swig/python #在gdal目录下,进入swig/python
- python3 setup.py build #安装
- python3 setup.py install
参考
ubuntu编译安装GDAL_yhj101096的博客-CSDN博客
gdal-3.3.1 linux(Ubuntu) 编译(附SQLite3 PROJ6编译)_Clement-CSDN博客