Skip to content
The Chat Archive
qwen3-235b-a22b-no-thinking· Alibaba (Qwen) LMArena Human Preference 140K

how to find postgres related packages in dnf (i am missing pg_config)

  1. User

    how to find postgres related packages in dnf (i am missing pg_config)

  2. Assistant

    If you're trying to find PostgreSQL-related packages using dnf (on a system like Fedora or RHEL/CentOS 8+), and you're missing pg_config, it's likely you need the PostgreSQL development package.

    The pg_config utility is part of the postgresql-devel package on most RPM-based distributions.


    🔍 Steps to Find & Install PostgreSQL Packages

    1. Search for PostgreSQL-related packages

    You can search for available PostgreSQL packages with:

    dnf search postgresql
    

    This will list all packages that include "postgresql" in their name or description.


    2. Find which package provides pg_config

    Use dnf provides to find out which package contains pg_config:

    dnf provides '*/pg_config'
    

    This should return something like:

    postgresql-devel-<version>.x86_64 : PostgreSQL development headers and static libraries
    Repo        : <repo-name>
    Matched from:
    Filename    : /usr/bin/pg_config
    

    3. Install the correct package

    Once you know the package name, install it:

    sudo dnf install postgresql-devel
    

    If you're using a version-specific setup (e.g., PostgreSQL 15), you might need to install a versioned package:

    sudo dnf install postgresql15-devel
    

    You can check available versions by searching again:

    dnf search postgresql | grep -i devel
    

    ✅ Summary

    TaskCommand
    Search for PostgreSQL packagesdnf search postgresql
    Find which package has pg_configdnf provides '*/pg_config'
    Install the development packagesudo dnf install postgresql-devel

    Let me know your OS/distribution if you want exact package names for your system!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.