Skip to content

Instantly share code, notes, and snippets.

@mdiener21
Last active June 24, 2020 16:18
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save mdiener21/4ea94d50f1260bee39647d99517f6e9d to your computer and use it in GitHub Desktop.
Save mdiener21/4ea94d50f1260bee39647d99517f6e9d to your computer and use it in GitHub Desktop.
Setup Ubuntu 16.04 for GIS development postgresql 9.6, postgis 2.3, gdal 2.1.2, python 3.5, pgrouting
sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6
sudo apt-get install postgresql-9.6-postgis-2.3
sudo apt-get install postgresql-9.6-pgrouting
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt install gdal-bin python3-gdal
sudo apt-get -y install python3-pip
python3 -m pip install
python3 -m pip install --upgrade pip
python3 -m pip install pytest
sudo apt-get install python3-venv
@bayoishola20
Copy link

bayoishola20 commented May 29, 2017

Hi!

Thanks for this. Having the set-up as above, I am unable to get PostGIS Shapefile and DBF Loader , a plugin on pgAdmin III on.

I have edited sudo gedit /usr/share/pgadmin3/plugins.d/plugins.ini and added this

;
; pgShapeLoader (Linux):
; 
Title=PostGIS Shapefile and DBF loader
Command=$$PGBINDIR/shp2pgsql-gui -U $$USERNAME -d $$DATABASE -p $$PORT -h $$HOSTNAME
Description=Open a PostGIS ESRI Shapefile or Plain dbf loader console to the current database.
KeyFile=$$PGBINDIR/shp2pgsql-gui
Platform=unix
ServerType=postgresql
Database=Yes
SetPassword=No

at the end of the file. Still, no luck. I am on a linux 16.04.

Thank you!

PS: I also did set PGBINDIR=/usr/bin

@bayoishola20
Copy link

bayoishola20 commented May 29, 2017

RESOLVED:

sudo apt-get install postgis
sudo apt-get install postgis-gui

@LucasBrum
Copy link

Thank you, dude!

Cheers from Brasil!

@simmonssong
Copy link

I got error when executing: sudo apt-get install postgresql-9.6-postgis-2.3
Ubuntu 16.04.6

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-9.6-postgis-2.3 : Depends: libgdal1i (>= 1.9.0) but it is not going to be installed
                              Depends: liblwgeom-2.3-0 (>= 2.3.0) but it is not going to be installed
                              Depends: libsfcgal1 (>= 1.2.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment