how to find postgres related packages in dnf (i am missing pg_config)
- User
how to find postgres related packages in dnf (i am missing pg_config)
- Assistant
If you're trying to find PostgreSQL-related packages using
dnf(on a system like Fedora or RHEL/CentOS 8+), and you're missingpg_config, it's likely you need the PostgreSQL development package.The
pg_configutility is part of thepostgresql-develpackage 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 postgresqlThis will list all packages that include "postgresql" in their name or description.
2. Find which package provides
pg_configUse
dnf providesto find out which package containspg_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-develIf you're using a version-specific setup (e.g., PostgreSQL 15), you might need to install a versioned package:
sudo dnf install postgresql15-develYou can check available versions by searching again:
dnf search postgresql | grep -i devel
✅ Summary
Task Command Search for PostgreSQL packages dnf search postgresqlFind which package has pg_configdnf provides '*/pg_config'Install the development package sudo dnf install postgresql-devel
Let me know your OS/distribution if you want exact package names for your system!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.