-bash: pg_dump: command not found

2019-08-17 00:23发布

I'm trying to pull a production database locally for my rails app. My local postgres version was too low so I needed to update to Postgresql 9.6.5 from 9.4.1.

I installed Postgres 9.6.6 via Homebrew as such:

brew install postgresql@9.6

Then ran:

brew services start postgresql@9.6

However, when I try to do pg_dump I get -bash: pg_dump: command not found.

I also tried updating my path as such:

export PATH="/usr/local/Cellar/postgresql\@9.6/9.6.6/bin:$PATH"

Any idea what I need to do to get pg_dump to work?

1条回答
倾城 Initia
2楼-- · 2019-08-17 00:40

Adding this to my ~/.bash_profile did the trick:

export PATH=/usr/local/Cellar/postgresql\@9.6/9.6.6/bin:$PATH

查看更多
登录 后发表回答