这篇文章介绍一下PostgreSQL的客户端安装方法。 文章目录 Ubuntu Debian Windows macOS 方法1: 使用brew安装整体的包 方法2: 使用官方的安装包 方法3: 使用Postgres.app 方法4: 使用libpq 环境确认 brew update brew install libpq 结果确认 总结 Ubuntu 执行如下安装命令: sudo apt-get update sudo apt-get install postgresql-client Debian 执行如下安装命令: sudo apt-get update sudo apt-get install postgresql-client Windows 安装方法参看: https://www.postgresql.org/download/windows/ macOS 在macOS下有多种安装方法,主要如下所示