trying to install pg_config binary. Can't find the right package

Hi there!

I’m quite stuck as I’m trying to get the pg_config binary from different postgresql packages but I can’t find the one that contains that bin.

I tried running:


$ cnf pg_config
                           
The program 'pg_config' can be found in following packages:
  * postgresql10-devel  path: /usr/bin/pg_config, repository: zypp (repo-oss) ]
  * postgresql11-server-devel  path: /usr/bin/pg_config, repository: zypp (repo-oss) ]
  * postgresql12-server-devel  path: /usr/bin/pg_config, repository: zypp (repo-oss) ]
  * postgresql13-server-devel  path: /usr/bin/pg_config, repository: zypp (repo-oss) ]
  * postgresql14-server-devel  path: /usr/bin/pg_config, repository: zypp (repo-oss) ]


Try installing with:
    sudo zypper install <selected_package>

But neither of those packages appear to install the pg_config binary.

I’ll really appreciate any help

Hi and welcome to the Forum :slight_smile:
Seems it’s a ghosted symlink from the spec file, check in /usr/lib/{pg_version}/bin/

It’s in postgresql{pg_version}-devel-mini is that installed?

Ref: File postgresql14.spec of Package postgresql14 - openSUSE Build Service

Hey malcolmlewis thank you for your answer!

I need to install version 10 of postgresql, I tried to install postgresql10-devel-mini and this is what I get:

# zypper in postgresql10-devel-mini
Loading repository data...
Reading installed packages...
Package 'postgresql10-devel-mini' not found.
Resolving package dependencies...
Nothing to do.

It seems that this devel-mini package is only available for version 14, but this is what I get:

# zypper in postgresql14-devel-mini
Loading repository data...
Reading installed packages...
Resolving package dependencies...


Problem: nothing provides 'this-is-only-for-build-envs' needed by the to be installed postgresql14-devel-mini-14.1-2.3.x86_64
 Solution 1: do not install postgresql14-devel-mini-14.1-2.3.x86_64
 Solution 2: break postgresql14-devel-mini-14.1-2.3.x86_64 by ignoring some of its dependencies

I’m a newbie in this topic as I moved from Ubuntu a few days ago and the way I solved this was by installing the libpq-dev package.

Oddly enough, it’s actually included in **postgresql14-server-devel

**


saltstack:~ # rpm -qf /usr/bin/pg_config 
postgresql14-server-devel-14.1-5.6.1.x86_64

Thank you Miuku! It’s there. Would it work for postgresql 10 as well?

Yes, it’s the same for all versions although in the case of postgresql10, it’ll be named** postgresql10-devel** for historical reasons.

Thank you so much for your help! It’s working now :slight_smile: