This question has been flagged

Hi, im running odoo 10 at linux.

Im trying to install the Geospatial Support module, already installed all depencies, but when click on installing this message pops up:

"Error, can not automatically initialize spatial postgis support. Database user may have to be superuser and postgres/postgis extentions with their devel header have to be installed. If you do not want Odoo to connect with a super user you can manually prepare your database. To do thisopen a client to your database using a super user and run:
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;"

What can i do?

Thanks for reading.

Avatar
Discard

You do exactly what is written in the error message.

Best Answer

HI!

First of all You have to install Postgis as mentioned in geospatial module description

so run the command:sudo apt-get install postgis
But postgis depends on some other libraries like:

so you may encounter some problems during the installation 

so I recommend u this tutorial on how to install PostGIS and choose the right version you might need:

https://computingforgeeks.com/how-to-install-postgis-on-ubuntu-debian/

after the installation you are now able to create the two extensions needed to initiate this module on your database manually

these are some easy steps to  follow

1- connect as user postgres :sudo su postgres 

2-Switch to psql  by running:psql

3-Connect to your database:\c database_name ;

4-Run :

       CREATE EXTENSION postgis;

       CREATE EXTENSION postgis_topology;

   hope this helps someone,        

Avatar
Discard