Warning: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /home/public/wp-includes/functions.php on line 790
s/earch/ » Blog Archive » install PostgreSQL in Mac OSX via Homebrew

install PostgreSQL in Mac OSX via Homebrew

March 10th, 2010


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

Apple OSX Snow Leopard
System Version: Mac OS X 10.6.2
Kernel Version: Darwin 10.2.0

Install notes for PosgreSQL 8.4 install using the great
Homebrew by Adam Vandenberg.

Run the author’s installation script, and that’s it. Try:
$ brew help
$ brew search postgresql
$ brew install postgresql
==> Summary
/usr/local/Cellar/postgresql/8.4.2: 2297 files, 31M, built in 3.3 minutes
$ brew info postgresql
postgresql 8.4.2

My advice ? Use Homebrew. True UNIX tool!

EDIT:
- sudo is no longer needed to install formulas system wide;
- the postgresql formula will be updated with recent postgres versions, so to check versions do: $ brew versions postgresql

(blogged from Vim)


7 Comments to “install PostgreSQL in Mac OSX via Homebrew”


  1. kevin said:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    can you give instructions for installing postgresql 9 with brew?


  2. pedro mg said:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    @kevin is there is a Brew formula for it ?


  3. Gordon Dickens said:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    I get the following error, any suggesitons?

    curl: (22) The requested URL returned error: 404
    Error: Failure while executing: curl -f#LA ‘Homebrew 0.6 (Ruby 1.8.7-174; Mac OS X 10.6.6)’ http://ftp2.uk.postgresql.org/sites/ftp.postgresql.org/source/v8.4.4/postgresql-8.4.4.tar.bz2 -o /Library/Caches/Homebrew/postgresql-8.4.4.tar.bz2
    Technophiliac:~ gordon$


  4. bernhard said:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    WARNING: Currently this formula installs 9.0.2, no longer 8.4.2 !!!


  5. Bruce said:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    Any idea how to get the default brew postgresql install to also build the java libs?
    Or, more generically, how to change the brew build args so that one could add whatever args are needed to build for java clients as well?


  6. Marty Y. Chang said:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    Interestingly enough, when I ran…

    $ sudo brew install postgresql

    brew came back and told me: Cowardly refusing to `sudo brew install’

    So instead I tried…

    $ brew install postgresql

    Luckily it seems like the non-sudo installation worked just fine!


  7. pedro mg said:

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/wp-includes/functions-formatting.php on line 76

    Thanks @Marty, edited the post. Confirmed, current homebrew installs don’t need sudo permission to install formulas.

    @bernhard, check $ brew version postgresql

    @bruce: you’ll need to edit the formula for that, not that hard ;)

Leave a Reply