Homebrew postgres broken

前端 未结 8 1713
野趣味
野趣味 2020-12-07 08:49

I installed Postgresql 9.4.0 installed on my Mac (10.10.1/Yosemite) using homebrew. It does not work.

I have created the softlink to /usr/local/opt/postgresql/homebr

8条回答
  •  清歌不尽
    2020-12-07 09:34

    I had the same problem installing postgres using homebrew on a freshly installed Yosemite.

    First off my brew config looks like this:

    HOMEBREW_VERSION: 0.9.5
    ORIGIN: https://github.com/Homebrew/homebrew
    HEAD: 9f6926265f8e4be7cc80dfe9042f2cd3c1e8dc9e
    Last commit: 64 minutes ago
    HOMEBREW_PREFIX: /usr/local
    HOMEBREW_CELLAR: /usr/local/Cellar
    CPU: quad-core 64-bit sandybridge
    OS X: 10.10.1-x86_64
    Xcode: 6.1.1
    Clang: 6.0 build 600
    X11: N/A
    System Ruby: 2.0.0-481
    Perl: /usr/bin/perl
    Python: /usr/bin/python
    Ruby: ~/.rvm/rubies/ruby-2.1.1/bin/ruby
    

    First thing i noticed was that I had no write permission to /usr/local/var/postgres. This was easily changed issuing sudo chown -R `whoami` /usr/local/var/postgres then I reinstalled postgresql and did

    cat /usr/local/var/postgres/server.log

    which revealed:

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

    So I removed the directory /usr/local/var/postgres and issued the command to initialize the database.

    initdb -D /usr/local/var/postgres/

    This seemed to have done the trick and postgres is running fine.

提交回复
热议问题