Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install Postgresql on OSX Lion. I'm using Homebrew, so my installation consisted of doing

brew install postgresql
initdb /usr/local/var/postgres

Now when I try to start postgresql using

postgres -D /usr/local/var/postgres

I get the following error:

postgres cannot access the server configuration file "/usr/local/var/postgres/postgresql.conf": No such file or directory

To try and figure out what is going wrong I ran 'brew doctor', which gives me one error which looks like it could be my issue (although I'm not 100% sure)

Error: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

archive
clusterdb
createdb
createlang
createuser
dropdb
droplang
dropuser
ecpg
pg_config
pg_dump
pg_dumpall
pg_restore
pg_upgrade
psql
reindexdb
vacuumdb

Consider amending your PATH so that /usr/local/bin is ahead of /usr/bin in your PATH.

I tried adding /usr/local/bin to my PATH variable by adding

PATH=/usr/local/bin:$PATH

as the first line of my .profile, but that didn't seem to make a difference.

Is this really why my postgresql is giving issues? How do I go about resolving this?

share|improve this question
    
Well, have you looked at the actual error message and checked whether the postgresql.conf file exists? By the way you need export PATH=… to properly store it. – slhck May 8 '12 at 12:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.