Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8618615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:08:59+00:00 2026-06-12T06:08:59+00:00

EDIT: Ok, I uninstalled the versions that I had and reinstalled according to the

  • 0

EDIT:

Ok, I uninstalled the versions that I had and reinstalled according to the directions listed below:

I ran:

POSTGIS_SQL_PATH=/usr/local/Cellar/postgis15/1.5.3/share/postgis
# Creating the template spatial database.
createdb -E UTF8 template_postgis
createlang -d template_postgis plpgsql # Adding PLPGSQL language support.
# Allows non-superusers the ability to create from this template
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';"
# Loading the PostGIS SQL routines
psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql
# Enabling users to alter spatial tables.
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" 

then ran:

$ createdb -T template_postgis newdb
$ createuser --createdb poop
Shall the new role be a superuser? (y/n) y

Now Here is what I get for my db list:

$ psql -l
                                  List of databases
       Name       | Owner | Encoding |  Collation  |    Ctype    | Access privileges 
------------------+-------+----------+-------------+-------------+-------------------
 newdb            | User  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres         | User  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0        | User  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/User          +
                  |       |          |             |             | User=CTc/User
 template1        | User  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/User          +
                  |       |          |             |             | User=CTc/User
 template_postgis | User  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
(5 rows)

Making sure my version is correct:

$ psql newdb
psql (9.0.8)
Type "help" for help.

newdb=# SELECT PostGIS_full_version();
                                       postgis_full_version                                       
--------------------------------------------------------------------------------------------------
 POSTGIS="1.5.3" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.3" USE_STATS
(1 row)

newdb=# \dt
         List of relations
 Schema |       Name       | Type  | Owner 
--------+------------------+-------+-------
 public | geometry_columns | table | User
 public | spatial_ref_sys  | table | User
(2 rows)

It looks like all dependencies are taken care of and the database looks happy, everything looks clean! (However, where is the geograph_colums I grated all users access to above?)

Now, settings.py:

DATABASES = {
    'default': {
         'ENGINE': 'django.contrib.gis.db.backends.postgis',
         'NAME': 'newdb',
         'USER': 'poop', # yes, I named my user poop
     }
}

now when I run:

$ python manage.py syncdb

I get a link through of various files ending with:

psycopg2.OperationalError: could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Obviously my db is running because I can psql into it. However are permissions set up incorrectly?

pg_hba.conf:

# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

ANSWER:
Postgresql socket error on OSX 10.7.3 when running Django's syncdb

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:09:00+00:00Added an answer on June 12, 2026 at 6:09 am

    I’m not sure if the current Django release is compatible with PostGIS 2.0. You might like to try installing PostGIS 1.5. This may also mean installing PostgreSQL 9.0. Both these packages are in homebrew, but you need to “tap” the versions formulae:

    brew update
    brew tap homebrew/versions
    brew install postgresql9
    

    You’ll then need to change the default postgis15 package to point to postgresql9 (the most recent update of the postgresql package made it incompatible with postgis15, and the formula hasn’t been updated yet):

    brew edit postgis15
    

    Change the two instances of postgresql to postgresql9, eg:

    Line 12:

    depends_on 'postgresql9'
    

    Line 30:

    postgresql = Formula.factory 'postgresql9'
    

    Then install postgis15:

    brew install postgis15
    

    and create the relevant databases as you did before.

    Be careful that psql and the Python psycopg2 package are connecting to the correct database (postgres 9.0). psycopg2 additionally needs to be compiled against the correct libraries. The easiest way to ensure this is to uninstall the postgresql package from homebrew first (if you aren’t using it for anything else) and move the /usr/local/var/postgres data directory out of the way, before installing postgis15:

    brew uninstall postgresql
    mv /usr/local/var/postgres /usr/local/var/postgres9.1
    initdb /usr/local/var/postgres -E utf8
    brew install postgresql9
    

    … and recompiling psycopg2 against the new libraries (into your virtualenv):

    pip uninstall psycopg2
    pip install psycopg2
    

    This may not help, but it’s always good to use versions that are known to work, unless you’re willing to experiment, debug and submit patches 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit 1: Uninstalled & Reinstalled Edit 2: Same problem. Seriously? Yes. I am having
EDIT: I was an idiot. I simply had an image that was vertically long,
EDIT: See my answer below--> I am wanting to have a view that when
EDIT: iam using ajax to load text in my content that is why onload
Edit : Note that, as Daniel and latkin noted in an answer and a
EDIT : It turned out that this can only be done through an external
I had Ruby 1.9.2 install, but I uninstalled it long ago. Today I installed
My Windows XP workstation at the office had several old versions of the Java
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
Edit (updated question) I have a simple C program: // it is not important

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.