Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I was trying to install Postgres several times, but it didn't work out. I am using Mac and I tried to install Postgress.app, I got problems with database connection. I decided to install Postgress using HomeBrew.

At the beginning, I uninstalled all the versions: Using brew remove --force postgresql to remove all versions

I used brew cleanup posgtres as well

Then, launched the installation using home brew

> ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/postgresql-
> Already downloaded:
> /Library/Caches/Homebrew/postgresql-9.3.2.mountain_lion.bottle.tar.gz
> ==> Pouring postgresql-9.3.2.mountain_lion.bottle.tar.gz
> ==> Caveats If builds of PostgreSQL 9 are failing and you have version 8.x installed, you may need to remove the previous version first. See:   https://github.com/Homebrew/homebrew/issues/issue/2510
> 
> To migrate existing data from a previous major version (pre-9.3) of
> PostgreSQL, see:  
> http://www.postgresql.org/docs/9.3/static/upgrading.html
> 
> When installing the postgres gem, including ARCHFLAGS is recommended: 
> ARCHFLAGS="-arch x86_64" gem install pg
> 
> To install gems without sudo, see the Homebrew wiki.
> 
> To reload postgresql after an upgrade:
>     launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
>     launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Any recommendation to install Postgres right way on my machine.

share|improve this question
    
Even though I never tried to install pgsql/pg in Mac, it looks like you have installed/downloaded the 8.x version and the complain is about that. It seems your OS hasn't been cleaned enough so far. –  Gery Jan 19 at 10:53
    
What does this have to do with GIS.SE? Is the server running? Did you follow the instructions to reload postgresql? What are the errors? What debugging have you done? What were the results of that? Please edit the question to include this important information. –  BradHards Jan 19 at 11:24
    
This question appears to be off-topic because it belongs on dba.stackexchange.com –  PolyGeo Jan 19 at 12:15
add comment

closed as off-topic by BradHards, PolyGeo, underdark Jan 19 at 12:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about general computing hardware and software are off-topic here, but can be asked on Super User." – BradHards, underdark
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 3 down vote accepted
  1. It's a PATH issue. Mac OSX Lion includes PostgreSQL in the system now (version 8.4) in /usr/bin/pgsql
  2. then you install Postgress.app (version 9.x)
  3. and you have here a problem with the installed versions, look at Upgrading From A Previous Version.
  4. then you use brew remove --force postgresql or brew cleanup posgtres. But these commands removes any previous version of PostgreSQL installed by Homebrew (in usr/local/bin/psql) and not those installed previously.
  5. thus, you must first uninstall Postgress.app and must adapt your PATH to use the Homebrew version: Brew Install Postgresql on OS X Lion

Another solution is to use the PostgreSQL/PostGIS solution of KyngChaos (as a Framework).

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.