嘗試安裝libpq-dev或其他相當(dāng)?shù)臇|西
對于Ubuntu系統(tǒng):
sudo apt-get install libpq-dev
在Red Hat Linux(RHEL)系統(tǒng)上:
yum install postgresql-devel
對于Mac Homebrew:
brew install postgresql
對于Mac MacPorts PostgreSQL:
gem install pg -- --with-pg-config=/opt/local/lib/postgresql[version number]/bin/pg_config
對于OpenSuse:
zypper in postgresql-devel