It looks like in Ubuntu that header is part of the libpq-dev
package (at least in the following Ubuntu versions: 11.04 (Natty Narwhal), 10.04 (Lucid Lynx), 11.10 (Oneiric Ocelot), 12.04 (Precise Pangolin), 14.04 (Trusty Tahr) and 18.04 (Bionic Beaver)):
... /usr/include/postgresql/libpq-fe.h ...
So try installing libpq-dev
or its equivalent for your OS:
- For Ubuntu/Debian systems:
sudo apt-get install libpq-dev
- On Red Hat Linux (RHEL) systems:
yum install postgresql-devel
- For Mac Homebrew:
brew install postgresql
- For Mac MacPorts PostgreSQL:
gem install pg -- --with-pg-config=/opt/local/lib/postgresql[version number]/bin/pg_config
- For OpenSuse:
zypper in postgresql-devel
- For ArchLinux:
pacman -S postgresql-libs
Related Posts:
- Rails: Why “sudo” command is not recognized?
- What is the difference between Rails.cache.clear and rake tmp:cache:clear?
- could not connect to server: No such file or directory (PG::ConnectionBad)
- PG::ConnectionBad: fe_sendauth: no password supplied
- 400 Bad Request – request header or cookie too large
- Why Puma listen on ‘tcp://localhost:3000’ instead of ‘http://localhost:3000’
- Explain what " means
- Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000?
- ActionController::InvalidAuthenticityToken
- bundle install returns “Could not locate Gemfile”
- ActionController::InvalidAuthenticityToken
- Rails: Can’t verify CSRF token authenticity when making a POST request
- Getting error: Peer authentication failed for user “postgres”, when trying to get pgsql working with rails
- undefined method `each’ for nil:NilClass… why?
- Bundler: You must use Bundler 2 or greater with this lockfile
- undefined method `each’ for nil:NilClass… why?
- Using Pundit for all-access “super_admin” role
- How to tell if homebrew is installed on Mac OS X
- Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)
- Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
- Cannot load such file — bcrypt_ext
- How do I remove Permission denied @ rb_sysopen – Gem install error?
- warning: constant ::Fixnum is deprecated When generating new model
- curl : (1) Protocol https not supported or disabled in libcurl
- couldn’t find file ‘jquery’ with type ‘application/javascript’
- Passing parameters in rails redirect_to
- Getting: “Migrations are pending; run ‘bin/rake db:migrate RAILS_ENV=development’ to resolve this issue.” after cloning and migrating the project
- PG::ConnectionBad – could not connect to server: Connection refused
- Rails syntax error : unexpected keyword_ensure, expecting end-of-input
- How to find out which rails version an existing rails application is built on?
- RubyMine Unit tests – Test Framework quit unexpectedly
- bcrypt LoadError: Cannot load such file
- Uninitialized constant “Controller Name”
- How do I format datetime in rails?
- heroku open – no app specified
- Difference between rake db:migrate db:reset and db:schema:load
- TypeError: no implicit conversion of Symbol into Integer
- Sass::SyntaxError: File to import not found or unreadable: bootstrap-sprockets
- GROUP BY and COUNT using ActiveRecord
- How to stop (and restart) the Rails Server?
- Purge or recreate a Ruby on Rails database
- Migrations are pending; run ‘bin/rake db:migrate RAILS_ENV=development’ to resolve this issue
- Advanced AREL or just Rails Query for has_many through search by association
- PostgreSQL: Show tables in PostgreSQL
- What is this JavaScript “require”?
- What is this JavaScript “require”?
- PostgreSQL “DESCRIBE TABLE”
- Psql could not connect to server: No such file or directory, 5432 error?
- Rails 5 ActionController::InvalidAuthenticityToken error
- what does ? ? mean in ruby
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- What is the format for the PostgreSQL connection string / URL?
- What is the default password for Postgres
- PSQLException: current transaction is aborted, commands ignored until end of transaction block
- psql: FATAL: Ident authentication failed for user “postgres”
- Parsing XML with Ruby
- fe_sendauth: no password supplied
- missing FROM-clause entry for table
- How can I drop all the tables in a PostgreSQL database?
- How to restart PostgreSQL in Ubuntu 18.04
- FATAL: password authentication failed for user “postgres” (postgresql 11 with pgAdmin 4)
- PostgreSQL: Remotely connecting to Postgres instance using psql command
- Simple Random Samples from a Sql database
- Insert text with single quotes in PostgreSQL
- Email validation in Ruby on Rails?
- postgresql duplicate key violates unique constraint
- Simulate CREATE DATABASE IF NOT EXISTS for PostgreSQL?
- How to change PostgreSQL user password?
- Postgresql tables exists, but getting “relation does not exist” when querying
- No function matches the given name and argument types
- PostgreSQL error: Fatal: role “username” does not exist
- “extra data after last expected column” while trying to import a csv file into postgresql
- postgresql: error duplicate key value violates unique constraint
- extconf failed, exit code 1 error when installing [Ruby on Rails] 5 on OS X Yosemite 10.10.5
- Rails 4 RoutingError: No Route Matches
- psql: command not found Mac
- pg_ctl: no database directory specified and environment variable PGDATA unset
- psql: FATAL: role “postgres” does not exist
- Postgres Error: More than one row returned by a subquery used as an expression
- How to exit from PostgreSQL command line utility: psql
- What is the difference between LATERAL JOIN and a subquery in PostgreSQL?
- Devise lockable – How to unlock account using unlock_in
- Ruby: What is the easiest way to remove the first element from an array?
- Ruby String to Date Conversion
- PostgreSQL create table if not exists
- updating table rows in postgres using subquery
- postgres does not know where to find server configuration
- PostgreSQL visual interface similar to phpMyAdmin?
- PG COPY error: invalid input syntax for integer
- java.lang.ClassNotFoundException: org.postgresql.Driver, Android
- An unhandled lowlevel error occurred. The application logs may have details
- Postgres: INSERT if does not exist already
- Generate model in Rails using user_id:integer vs user:references
- where is devise implementation of “authenticate_user!” method?
- What is a postgres superuser
- How to force or redirect to SSL in nginx?
- Is there an equivalent of MySQL’s SHOW CREATE TABLE in Postgres?
- Postgres equivalent to MySQL’s \G?
- Postgresql: what does GRANT ALL PRIVILEGES ON DATABASE do?
- pg_dump and pg_restore: input file does not appear to be a valid archive