【发布时间】:2016-05-15 23:43:49
【问题描述】:
我正在尝试安装 Postgres 以使用 Heroku。
我按照 Heroku 教程中的说明进行操作,在 Postgres 安装(成功)之后,它说要配置我的 .bash_profile 以允许 Postgres 命令行功能。
我按照here 的说明进行操作,但无法成功添加此行:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
该文件夹实际上在我的计算机上包含“psql”,所以它应该可以工作。这是我当前的 .bash_profile:
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
# The next line updates PATH for the Google Cloud SDK.
source '/Users/user/google-cloud-sdk/path.bash.inc'
# The next line enables shell command completion for gcloud.
source '/Users/user/google-cloud-sdk/completion.bash.inc'
我尝试将 Postgres 行添加到该文件的末尾,但它不起作用。网上搜索后,关于如何将PATH添加到.bash_profile似乎并没有达成共识。我尝试了许多列出的版本,但没有一个有效。
如果我做错了请告诉我!
【问题讨论】:
标签: bash postgresql heroku psql .bash-profile