postgis的安装

我这里说明一下我安装的软件版本:

按照安装顺序介绍

1.安装postgresql10.2

https://zhuanlan.zhihu.com/p/81814954

2.安装高版本的gcc(因为在安装postgis的依赖的时候,进行编译需要高版本的gcc)

gcc-8.3.0.tar.gz
gmp-6.1.0.tar.bz2
isl-0.18.tar.bz2
mpfr-3.1.4.tar.bz2
安装过程:https://blog.csdn.net/davidhopper/article/details/79681695

3.安装postgis相关依赖

gdal-2.3.2.tar.gz
geos-3.7.0.tar.bz2
json-c-json-c-0.13.1-20180305.tar.gz
libxml2-2.9.0.tar.gz
proj-5.2.0.tar.gz
安装步骤:https://www.jianshu.com/p/e08dbc60a3b2

4.安装postgis-2.5.0.tar.gz

  1. cd 到解压目录下,然后运行以下命令: ./configure --prefix=/usr/local/postgis
    –with-pgconfig=/usr/local/postgresql-10.2/bin/pg_config --with-projdir=/usr/local/proj-5.2.0 --with-geosconfig=/usr/local/geos-3.7.0/bin/geos-config --with-gdalconfig=/usr/local/gdal-2.3.2/bin/gdal-config --with-jsondir=/usr/local/json-c-0.13.1 --with-xml2config=/usr/local/libxml2-2.9.0/bin/xml2-config
  2. make && make install

出现问题可参考以下博客:
https://www.cnblogs.com/ilifeilong/p/6979288.html(对postgresql加入postgis扩展,并出现问题的相应解决方法)
https://zhuanlan.zhihu.com/p/33149524(xxx is not in the sudoers file.This incident will be reported.的解决方法)

发布了51 篇原创文章 · 获赞 9 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_43316411/article/details/102729169