Installing pg gem - Can't find the 'libpq-fe.h header

Make sure PostgreSQL is installed.


Find the pg_config file:
find / -name pg_config 2>/dev/null

gem install pg --version '0.18.4' -- --with-pg_config=PATH_TO_PG_CONFIG

In my case:

gem install pg --version '0.18.4' -- --with-pg_config=/usr/lib/postgresql96/bin/pg_config

Kommentarer

  1. gem install pg -v '1.1.4' -- --with-pg_config=$(find / -executable -name pg_config 2>/dev/null)

    SvarSlet
  2. sudo gem install pg --version '1.1.4' -- --with-pg_config=/usr/lib/postgresql10/bin/pg_config

    use version 10 of postgresql -

    SvarSlet

Send en kommentar

Populære opslag fra denne blog

Hyundai i10 door panel removal

Hyundai i10 Subwoofer installation