Can't find the PostgreSQL client library (libpq) – after updating to Ruby 3.2.2

This page summarizes the projects mentioned and recommended in the original post on /r/rails

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rubygems

    Library packaging and distribution for Ruby.

  • bundle install Fetching gem metadata from https://rubygems.org/........... Resolving dependencies... Installing pg 1.5.4 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/victorblomberg/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/pg-1.5.4/ext /Users/victorblomberg/.asdf/installs/ruby/3.2.2/bin/ruby extconf.rb --with-pg-config\=/usr/local/opt/libpq/bin/pg_config Calling libpq with GVL unlocked Using config values from /usr/local/opt/libpq/bin/pg_config checking for whether -Wl,-rpath,/usr/local/opt/libpq/lib is accepted as LDFLAGS... yes Using libpq from /usr/local/opt/libpq/lib checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... no checking for PQconnectdb() in -llibpq... no checking for PQconnectdb() in -lms/libpq... no Can't find the PostgreSQL client library (libpq) ***************************************************************************** Unable to find PostgreSQL client library. Please install libpq or postgresql client package like so: brew install libpq or try again with: gem install pg -- --with-pg-config=/path/to/pg_config or set library paths manually with: gem install pg -- --with-pg-include=/path/to/libpq-fe.h/ --with-pg-lib=/path/to/libpq.so/ *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

  • asdf

    Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

  • I am using ASDF (https://asdf-vm.com/) as my Version Manager.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts