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
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern API for authentication & user identity.
  • LearnThisRepo.com - Learn 300+ open source libraries for free using AI.
  • 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.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

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