安装 postgresql 时出现 Homebrew 错误

Homebrew error while installing postgresql

我正在尝试在 MacOS 上使用 Homebrew 安装 Postgresql。在这个命令之后:

brew install postgresql

我收到这个错误:

Updating Homebrew...
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

fatal: Could not resolve HEAD to a revision

错误!

欢迎来到堆栈溢出,

我在使用 Homebrew 安装 PostgreSQL 时也遇到了这个错误, Homebrew 是一个不错的包管理器,但每次都使用它并不方便 我建议您从 https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

下载

在这里你可以下载适合你的兼容版本的包,然后有一些小步骤来安装PostgreSQL

HaPpY 编码