自作を使用してOSXLionにpostgresの最新バージョンをインストールしました。パスは正しいです:
$ which postgres
/usr/local/bin/postgres
$ which psql
/usr/local/bin/psql
醸造医は幸せです。ただし、ユーザーを作成しようとすると、次のようになります。
$ createuser myuser
Password:
createuser: could not connect to database postgres: FATAL: password authentication failed for user <$USER>
パスワードは間違いなく私の通常のユーザーパスワードではなく、それが何であるかを知る方法がわかりません。しばらく前にhomebrewを使用して別のバージョンのpostgresをインストールし、他の多くのものをインストールした可能性がありますが、思い出せません。削除した新しいバージョンの「postgres」と一緒にインストールされた別のバージョンの「postgresql」に気づきました。
これが手がかりかどうかはわかりませんが、私がこれを行うと:
$ sudo su - postgres
psqlへのパス(postgresではない)は正しくなくなりました:
postgres$ which postgres
/usr/local/bin/postgres
postgres$ which psql
/usr/bin/psql
単純なものかもしれません。助けていただければ幸いです。ありがとう!
Mac OS X Lion 10.7.5
homebrew 0.9.3
postgres 9.2.1