Database Postgres.app安装程序:正在获取返回所需路径的“哪个psql”
我刚刚安装了Postgres.app,现在psqlDatabase Postgres.app安装程序:正在获取返回所需路径的“哪个psql”,database,postgresql,heroku,terminal,.bash-profile,Database,Postgresql,Heroku,Terminal,.bash Profile,我刚刚安装了Postgres.app,现在psql什么也不返回。我跟着那条路走;以下是我所做的: 1) 把我的旧版本的Postgres拖到垃圾桶里。倒垃圾 2) 下载了Postgres.app的当前版本。将其拖到应用程序文件夹 3) 重新启动终端 我从哪个psql中寻找的输出类似于:/Applications/Postgres.app/Contents/Versions/9.3/bin/psql 当我运行brew install postgresql然后运行哪个psql时,我得到/usr/loc
什么也不返回。我跟着那条路走;以下是我所做的:
1) 把我的旧版本的Postgres拖到垃圾桶里。倒垃圾
2) 下载了Postgres.app的当前版本。将其拖到应用程序文件夹
3) 重新启动终端
我从哪个psql中寻找的输出类似于:/Applications/Postgres.app/Contents/Versions/9.3/bin/psql
当我运行brew install postgresql
然后运行哪个psql
时,我得到/usr/local/bin/psql
。这至少是件事,但这不是我想要的
如果有用,下面是我的.bashrc:
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
export DYLD_LIBRARY_PATH="/Applications/Postgres.app/Contents/MacOS/lib:$DYLD_LIBRARY_PATH"
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
rvm get stable --auto-dotfiles
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
和我的.bash_档案:
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
# Python
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
if [[ -r /usr/local/share/python/virtualenvwrapper.sh ]]; then
source /usr/local/share/python/virtualenvwrapper.sh
else
echo "WARNING: Can't find virtualenvwrapper.sh"
fi
export PS1="\h:\w \u\$ "
# for git
LESS="-qrX -P %lt"
export LESS
# colorize shell output
export CLICOLOR=1
export LSCOLORS=Hxfxcxdxbxegedabagacad
#========== ALIASES ===========
alias u="cd .."
alias uu="cd ../.."
alias uuu="cd ../../.."
alias cd..="cd .."
alias rm="rm -i"
alias ll="ls -laFGh"
alias ls="ls -FGh"
alias new="ls -lat | head -15"
# node needs to not have DYLD_LIBRARY_PATH set
alias node="DYLD_LIBRARY_PATH=''; node"
# postgres stuff
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
export DYLD_LIBRARY_PATH="/Applications/Postgres.app/Contents/MacOS/lib:$DYLD_LIBRARY_PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
非常感谢 一个解决方案!对于子孙后代,以下是对我有用的东西:
1) 将行export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
添加到.bash\u配置文件中。为了进一步阅读,我在上找到了这个解决方案
2) 运行brew卸载postgresql
。这似乎不太理想,因为我以后几乎肯定会想要它,但在卸载之前,当我运行哪个psql
解决方案时,我只得到了brew安装的postgresql的路径!对于子孙后代,以下是对我有用的东西:
1) 将行export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
添加到.bash\u配置文件中。为了进一步阅读,我在上找到了这个解决方案
2) 运行brew卸载postgresql
。这似乎不太理想,因为我以后几乎肯定会想要它,但在卸载之前,当我运行哪个psql
时,我只得到brew安装的postgresql的路径