Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash Mac OS X 10.11-将Postgres添加到$PATH失败_Bash_Postgresql_Heroku_Psql_.bash Profile - Fatal编程技术网

Bash Mac OS X 10.11-将Postgres添加到$PATH失败

Bash Mac OS X 10.11-将Postgres添加到$PATH失败,bash,postgresql,heroku,psql,.bash-profile,Bash,Postgresql,Heroku,Psql,.bash Profile,为了使用Heroku,我正在尝试安装Postgres 我按照Heroku教程中的说明进行操作,在Postgres安装(成功)后,它说要配置我的.bash_配置文件以允许Postgres命令行功能 我正在按照说明操作,但无法成功添加此行: export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin 那个文件夹实际上在我的计算机上包含“psql”,所以它应该可以工作。以下是我当前的.bash_配置文件: # S

为了使用Heroku,我正在尝试安装Postgres

我按照Heroku教程中的说明进行操作,在Postgres安装(成功)后,它说要配置我的.bash_配置文件以允许Postgres命令行功能

我正在按照说明操作,但无法成功添加此行:

export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
那个文件夹实际上在我的计算机上包含“psql”,所以它应该可以工作。以下是我当前的.bash_配置文件:

# 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行添加到该文件的末尾,但它不起作用。在网上搜索之后,对于如何向.bash_配置文件添加路径似乎并没有达成共识。我尝试了许多列出的版本,但没有一个有效


如果我做得不对,请告诉我

将这一行添加到您的
.bash\u配置文件的末尾

export PATH=/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH
这使得对二进制文件的搜索“在路径的其余部分之前”查找该位置

杀死终端的所有实例并再次打开它,那么它应该可以工作

尝试
哪个xxx
其中xxx是/Applications/Postgres.app/Contents/Versions/latest/bin中某些二进制文件的名称,并检查它是否返回该位置


告诉我它是否有效。

我对这个问题的回答和解释太多了,但都不起作用。你的的确如此,而且,我明白为什么。谢谢你简洁明了的解释。