lui*_*uii 2 postgresql homebrew createuser hl7-fhir
lawn-128-61-59-74:~ postgres$ createuser -R -P -S -D fhir
运行“brew install postgresql”并运行postgres后,运行上述命令时出现以下错误:
“-bash:createuser:找不到命令”
跑:
sudo find / -name createuser
Run Code Online (Sandbox Code Playgroud)
这将找到createuser命令在您的机器上的位置。将您找到的内容添加到您的路径中。
这可能意味着 Postgres 不在您的PATH.
由于您安装了 Homebrew,因此您PATH应该包括
Applications/Postgres.app/Contents/Versions/9.6/bin
Run Code Online (Sandbox Code Playgroud)
您可以将此行添加到您的.bash_profile解决方案中
export PATH="Applications/Postres.app/Contents/Versions/9.6/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)
(注意:9.6是版本——这对您来说可能有所不同。)
如果您没有brew安装 Postgres,您可以使用 Vao Tsun 的答案来查找 Postgres 在您计算机上的位置,并将其添加到您的路径中
| 归档时间: |
|
| 查看次数: |
6924 次 |
| 最近记录: |