[英]postgres.app installed but which psql displays /usr/bin/psql and not path entered into zshrc
Having an issue with postgres.app where its installed, its running, but when I enter which psql I then receive "/usr/bin/psql" and not the correct path that postgres.app expects. 有postgres.app的问题,它安装,运行,但当我输入哪个psql然后我收到“/ usr / bin / psql”而不是postgres.app期望的正确路径。 When I echo my PATH I get the following: 当我回应我的PATH时,我得到以下内容:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/username/.rvm/bin:/usr/local/mysql/bin:/Applications/Postgres.app/Contents/MacOS/bin:/Users/username/.rvm/gems/ruby-1.9.3-p0/bin:/Users/username/.rvm/gems/ruby-1.9.3-p0@global/bin:/Users/username/.rvm/rubies/ruby-1.9.3-p0/bin:/Users/username/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Applications/MAMP/Library/bin/mysql:/Users/username/.rvm/bin
As you can see its in my Path but I have no idea why it wont choose the correct psql. 正如你可以在我的路径中看到它,但我不知道为什么它不会选择正确的psql。 Any assistance would be appreciated. 任何援助将不胜感激。
If psql
is both in /usr/bin
and /Applications/Postgres.app/Contents/MacOS/bin
, the one in /usr/bin
will be preferred according to your PATH
specification. 如果psql
同时位于/usr/bin
和/Applications/Postgres.app/Contents/MacOS/bin
,则根据您的PATH
规范, /usr/bin
那个将是首选。 Consider putting the /Applications/...
entry before /usr/bin
: 考虑在/usr/bin
之前放置/Applications/...
条目:
/Applications/Postgres.app/Contents/MacOS/bin:/usr/bin:/bin:/usr/sbin:/sbin:...
You can also edit /etc/paths and make sure /Applications/Postgres.app/Contents/MacOS/bin is on the top. 您还可以编辑/ etc / paths并确保/Applications/Postgres.app/Contents/MacOS/bin位于顶部。 More info: https://stackoverflow.com/a/6772559/2643002 更多信息: https : //stackoverflow.com/a/6772559/2643002
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.