在我的Mac上使用自制软件安装后找不到Postgres createuser命令

问题描述 投票:1回答:2

lawn-128-61-59-74:~ postgres$ createuser -R -P -S -D fhir

运行“brew install postgresql”并运行postgres后,运行上面的命令时出现以下错误:

“-bash:createuser:command not found”

postgresql homebrew hl7-fhir createuser
2个回答
4
投票

跑:

 sudo find / -name createuser

2
投票

这可能意味着Postgres不在你的PATH

由于您使用Homebrew安装,因此您的PATH应包括

Applications/Postgres.app/Contents/Versions/9.6/bin

您可以将此行添加到.bash_profile以解决此问题

export PATH="Applications/Postres.app/Contents/Versions/9.6/bin:$PATH"

(注意:9.6是版本 - 这可能与您不同。)


如果您没有使用brew安装Postgres,您可以使用Vao Tsun的answer找到Postgres在您机器上的位置,并将其添加到您的路径中

© www.soinside.com 2019 - 2024. All rights reserved.