使用mac OSX Yosemite 10.10.1.我用自制软件卸载并重新安装了postgres和postgis.我知道postgres正在查找postgis控制文件的错误位置.还注意到’哪个psql’路径似乎不正确.我如何/在哪里解决这个问题?
Psql
(9.4.0,server 9.3.5) ERROR: could not open extension control file "/usr/local/Cellar/postgresql/9.3.5_1/share/postgresql/extension/postgis.control": No such file or directory
找到/ usr -name postgis.control
/usr/local/Cellar/postgresql/9.4.0/share/postgresql/extension/postgis.control
哪个psql
/usr/local/bin/psql
哪个pg_config
/usr/local/bin/pg_config
brew info postgis
postgis: stable 2.1.5,HEAD http://postgis.net /usr/local/Cellar/postgis/2.1.5 (45 files,8.6M) * Built from source From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/postgis.rb
brew info postgres
postgresql: stable 9.4.0 (bottled) http://www.postgresql.org/ Conflicts with: postgres-xc /usr/local/Cellar/postgresql/9.4.0 (3049 files,74M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/postgresql.rb
.bashrc和.bash_profile都有
export PGDATA='/usr/local/Cellar/postgresql/9.4.0/bin/postgres' alias postgres-log='cd /usr/local/var/postgres/ && subl server.log'
mdfind -name“postgres”| grep -G“postgres $”
/usr/local/Cellar/postgresql/9.4.0/bin/postgres /usr/local/var/postgres /Users/lionelramos/macports/var/macports/sources/rsync.macports.org/release/tarballs/ports/ruby/rb-postgres
看起来除了自制软件版本之外,我还有不同的postgres本地版本.