https://stackoverflow.com/questions/6040583/cant-find-the-libpq-fe-h-header-when-trying-to-install-pg-gem

 

  • For Ubuntu systems: sudo apt-get install libpq-dev
  • On Red Hat Linux (RHEL) systems: yum install postgresql-devel
  • For Mac Homebrewbrew install postgresql
  • For Mac MacPorts PostgreSQL: gem install pg -- --with-pg-config=/opt/local/lib/postgresql[version number]/bin/pg_config
  • For OpenSusezypper in postgresql-devel

相关文章: