Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing PostGIS for PostgreSQL on Mac

I'm trying to install PostgreSQL with its PostGIS extension on Mac. The installation happens in two parts : 1) PostgreSQL and 2) PostGIS through the stack builder. The first phase goes smoothly, but the second phase returns the following error at the beginning of the installation of PostGIS:

enter image description here

enter image description here

I trying installing it with the latest version of PostgreSQL as well (version 12), and I get the same error. Any idea what is happening here?

like image 636
Lucien S. Avatar asked Feb 15 '20 15:02

Lucien S.


People also ask

How do you check PostGIS is installed or not?

Postgis is easily installed from apt. Depending on which version of Ubuntu you are using, and which repositories you have configured, these commands will install PostGIS 1.5, or 2. x. You can find the version installed by issuing a select PostGIS_full_version(); query with psql or another tool.

How do I enable PostGIS on pgAdmin?

You can do this from within pgAdmin or via psql -U [superuser] [database] from a command line. Alternately for the command adverse; as a superuser; from within pgAdmin right click on your database's Extensions and select New Extension. Then in the drop down associated with Name select the postgis* extensions needed.


1 Answers

I have the same issue when I install PostGIS by Stack Builder on MacOS. After many times trying to install/uninstall PostGIS. Finally, I installed it successfully by manual installation. I think this issue caused by your MacOS doesn't have or conflict in the default app for extracting .zip file.

I have fixed it by install manually, like the following:

  • Download PostGIS by Stack Builder as usual
  • Open the folder where you have downloaded PostGIS (often it is /Users/yourUserName)
  • Extract the PostGIS zip file (the file name like this: edb_postgis_...)
  • Install PostGIS app

Finally, everything is done! You have installed it successfully!

like image 153
Hoang Dinh Avatar answered Oct 17 '22 20:10

Hoang Dinh