[英]zsh: command not found postgres
mac bigSur 11.6.4, zsh mac bigSur 11.6.4,zsh
Issue: I am trying to start postgres server via command "postgres".问题:我正在尝试通过命令“postgres”启动 postgres 服务器。 I am getting the following error "zsh command not found postres"
我收到以下错误“找不到 zsh 命令 postres”
I installed postgres@12 via homebrew.我通过自制软件安装了 postgres@12。 I see postgresql@12 in /usr/local/var/
我在 /usr/local/var/ 中看到 postgresql@12
The only things in /usr/local/var are: homebrew, log, and postgresql@12 /usr/local/var 中唯一的东西是:自制软件、日志和 postgresql@12
My.zshrc file looks like this as it stands My.zshrc 文件看起来像这样
export PATH=/usr/local/bin:$PATH
source /usr/local/opt/chruby/share/chruby/chruby.sh
source /usr/local/opt/chruby/share/chruby/auto.sh
export PGDATA=/usr/local/var/postgresql@12
export PGHOST=/tmp
Does anyone know if I am missing something?有谁知道我是否遗漏了什么?
You need to use homebrew's services
command.您需要使用自制软件的
services
命令。
This will list available services (in case you have multiple postgres versions installed) and their statuses:这将列出可用服务(如果您安装了多个 postgres 版本)及其状态:
brew services
To start a service, run this command:要启动服务,请运行以下命令:
brew services start postgresql@12
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.