简体   繁体   English

将Postgres 9.3安装到Mac后无法将路径映射到postresql

[英]Unable to map path to postresql after installation of Postgres 9.3 to mac

After installing Postgresql by dragging folder into my applications folder I am unable to get commands to work in the terminal and unable to add the path so that is shows up using the command $ echo $PATH. 通过将文件夹拖到我的应用程序文件夹中来安装Postgresql后,我无法在终端中使用命令,也无法添加路径,因此使用$ echo $ PATH命令可以显示该路径。

Postgres starts in the terminal using the elephant icon on the system tray and selecting "open psql" so I believe it installed correctly. Postgres使用系统托盘上的大象图标从终端启动,然后选择“ open psql”,因此我相信它已正确安装。

I tried adding all different combinations of the following lines to my .bash_profile 我尝试将以下各行的所有不同组合添加到我的.bash_profile中

PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"

then 然后

PATH="/Applications/Postgres93.app/Contents/MacOS/bin:$PATH"

then 然后

export PATH=$PATH:/Applications/Postgres93.app/Contents/MacOS/bin

and finally 最后

export PATH=$PATH:/Applications/Postgres93.app/Contents/MacOS/bin

after each attempt I ran $ source $HOME/.bash_profile and then checked path and/or tried $psql $ which psql to no avail. 每次尝试后,我运行$ source $ HOME / .bash_profile,然后检查路径和/或尝试$ psql $,其中psql无效。

Also tried adding lines to .bashrc , .profile and .zshrc without luck. 还尝试在.bashrc,.profile和.zshrc中添加行,但是没有运气。

The path to the executable commands bin folder in the app (psql, createdb, createlang, etc..) is 应用程序中可执行命令bin文件夹(psql,createdb,createlang等)的路径为

$ /Applications/Postgres93.app/Contents/MacOS/bin

Any help would be greatly appreciated! 任何帮助将不胜感激!

running OSX 10.9.1 运行OSX 10.9.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM