Here’s the culprit… Now, let’s see if we can figure why it failed to find pg_config.
What is your base OS?
cat /etc/os-release
The pg_config is provided by the postgresql13-server-devel on a Leap15.4 Rockstor install from the ISO, so let’s verify that in your system:
first, is it present?
which pg_config
and then is the package installed?
$ zypper info postgresql13-server-devel
Loading repository data...
Reading installed packages...
Information for package postgresql13-server-devel:
--------------------------------------------------
Repository : Update repository with updates from SUSE Linux Enterprise 15
Name : postgresql13-server-devel
Version : 13.11-150200.5.40.1
Arch : x86_64
Vendor : SUSE LLC <https://www.suse.com/>
Installed Size : 6.0 MiB
Installed : Yes (automatically)
Status : up-to-date
Source package : postgresql13-13.11-150200.5.40.1.src
Upstream URL : https://www.postgresql.org/
Summary : PostgreSQL server development header files and utilities
Description :
PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, and user-defined
types and functions.
This package contains the header files and libraries needed to compile
C extensions that link into the PostgreSQL server. For building client
applications, see the postgresql13-devel package.
cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.4"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.4"
PRETTY_NAME="Rockstor built on openSUSE Leap 15.4"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.4"
BUG_REPORT_URL="https://forum.rockstor.com"
HOME_URL="http://rockstor.com/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap"
LOGO="distributor-logo-Leap"
which pg_config
which: no pg_config in (/sbin:/usr/sbin:/usr/local/sbin:/root/.local/bin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)
zypper info postgresql13-server-devel
Retrieving repository 'Update repository of openSUSE Backports' metadata .............................................................................................................................[done]
Building repository 'Update repository of openSUSE Backports' cache ..................................................................................................................................[done]
Loading repository data...
Reading installed packages...
Information for package postgresql13-server-devel:
--------------------------------------------------
Repository : Update repository with updates from SUSE Linux Enterprise 15
Name : postgresql13-server-devel
Version : 13.11-150200.5.40.1
Arch : x86_64
Vendor : SUSE LLC <https://www.suse.com/>
Installed Size : 6.0 MiB
Installed : Yes (automatically)
Status : up-to-date
Source package : postgresql13-13.11-150200.5.40.1.src
Upstream URL : https://www.postgresql.org/
Summary : PostgreSQL server development header files and utilities
Description :
PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, and user-defined
types and functions.
This package contains the header files and libraries needed to compile
C extensions that link into the PostgreSQL server. For building client
applications, see the postgresql13-devel package.
I did a google search and this is defo not an area I have had experience before and it does see that the ‘pg_config’ is not configured and looking at this website
Example
To reproduce the build configuration of the current PostgreSQL installation, run the following command:
eval ./configure `pg_config --configure`
The output of pg_config --configure contains shell quotation marks so arguments with spaces are represented correctly. Therefore, using eval is required for proper results.
Is this the way to address this issue so I can get my media server back online?
Sorry for not getting back earlier… This one is actually a bit tricky as it results from some unknown changes in the system packages that provides this binary. I started looking into it last night but got interrupted and I haven’t been able to find time since.
The bottom line is that this binary is “supposed” to be provided by the postgresql13-server-devel package, but it isn’t anymore in your system. I suspect something happened during some system updates–this is also likely if you stayed from 15.3 and zypper dup’ed to 15.4 as there may have been some changes in how that binary is provided.
I unfortunately can’t test any of this at this very moment but if you are game, we can try to see if reinstalling/installing some packages can help you. I must preface that this would be trial and error for me, though. Let me know if you are game and I can write down what I can think worth trying.
Let’s also see what packages related to postgresql you have currently installed:
rockstable:~ # zypper search --installed-only | grep postgresql
i | openSUSE-SLE-15.4-2022-1463 | Recommended update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-1895 | Security update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-1908 | Security update for postgresql14 | patch
i | openSUSE-SLE-15.4-2022-2706 | Recommended update for postgresql | patch
i | openSUSE-SLE-15.4-2022-2987 | Security update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-2989 | Security update for postgresql14 | patch
i | openSUSE-SLE-15.4-2022-4447 | Recommended update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-4645 | Security update for postgresql14, postgresql15 | patch
i | openSUSE-SLE-15.4-2023-83 | Recommended update for postgresql | patch
i | openSUSE-SLE-15.4-2023-569 | Security update for postgresql15 | patch
i | openSUSE-SLE-15.4-2023-583 | Security update for postgresql13 | patch
i | openSUSE-SLE-15.4-2023-2207 | Security update for postgresql15 | patch
i | openSUSE-SLE-15.4-2023-2219 | Security update for postgresql13 | patch
i | postgresql | Basic Clients and Utilities for PostgreSQL | package
i | postgresql-devel | PostgreSQL development header files and libraries | package
i | postgresql-server | The Programs Needed to Create and Run a PostgreSQL Server | package
i | postgresql-server-devel | PostgreSQL server development header files and utilities | package
i | postgresql13 | Basic Clients and Utilities for PostgreSQL | package
i | postgresql13-devel | PostgreSQL client development header files and libraries | package
i | postgresql13-server | The Programs Needed to Create and Run a PostgreSQL Server | package
i | postgresql13-server-devel | PostgreSQL server development header files and utilities
@Flox as arranged in side chat - not wanting to clutter here, I have the output from the 3 VM systems that built all the rpm packages in question: going back to 15.3 as we seem to have two instances of this same bug where systems have been in-place zypper dup from 15.3 to 15.4. The 15.5 system is a Minimal_VM refreshed just the other day. Our 15.5 rpms are only really viable in testing currently. But including here for completeness as there was a suspicion that this missing file had some-how been transitioned to a newer postgres package and the change was backported to earlier OS versions - thus removing it from the backports. But that doesn’t seem to be the case as the 15.5 here has ownership of this file and in the same postgresql server dev package as all the others.
Hope that helps, at least for context. All rpms published to testing and stable are build on their respective platforms and the build only succeeds if all tests pass and the resulting rpm then successfully installs. We have more improvements to make re testing but that is, as always, on-going.
Here is the output from all the things you have asked me to run and I really appreciate the effort to put this all together.
To cut to the chase these stand out for me
ls -lah /usr/bin/pg_config
ls: cannot access '/usr/bin/pg_config': No such file or directory
ls -lah /etc/alternatives/pg_configls -lah /etc/alternatives/pg_config
ls: cannot access '/etc/alternatives/pg_configls': No such file or directory
/usr/bin/pg_config --version
-bash: /usr/bin/pg_config: No such file or directory
zypper ref
Repository 'Leap_15_4' is up to date.
Repository 'Leap_15_4_Updates' is up to date.
Repository 'Rockstor-Testing' is up to date.
Repository 'home_rockstor' is up to date.
Repository 'home_rockstor_branches_Base_System' is up to date.
Repository 'Update repository of openSUSE Backports' is up to date.
Repository 'Update repository with updates from SUSE Linux Enterprise 15' is up to date.
All repositories have been refreshed.
zypper update --no-recommends
Loading repository data...
Reading installed packages...
Nothing to do.
zypper lr --uri
Repository priorities in effect: (See 'zypper lr -P' for details)
97 (raised priority) : 1 repository
99 (default priority) : 5 repositories
105 (lowered priority) : 1 repository
# | Alias | Name | Enabled | GPG Check | Refresh | URI
--+------------------------------------+-------------------------------------------+---------+-----------+---------+----------------------------------------------------------------------------------------
1 | Leap_15_4 | Leap_15_4 | Yes | (r ) Yes | Yes | http://download.opensuse.org/distribution/leap/15.4/repo/oss/
2 | Leap_15_4_Updates | Leap_15_4_Updates | Yes | (r ) Yes | Yes | https://download.opensuse.org/update/leap/15.4/oss/
3 | Rockstor-Testing | Rockstor-Testing | Yes | (r ) Yes | Yes | http://updates.rockstor.com:8999/rockstor-testing/leap/15.4
4 | home_rockstor | home_rockstor | Yes | (r ) Yes | Yes | https://download.opensuse.org/repositories/home:/rockstor/15.4/
5 | home_rockstor_branches_Base_System | home_rockstor_branches_Base_System | Yes | (r ) Yes | Yes | https://download.opensuse.org/repositories/home:/rockstor:/branches:/Base:/System/15.4/
6 | repo-backports-debug-update | Update repository with updates for open-> | No | ---- | ---- | http://download.opensuse.org/update/leap/15.4/backports_debug/
7 | repo-backports-update | Update repository of openSUSE Backports | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.4/backports/
8 | repo-sle-debug-update | Update repository with debuginfo for up-> | No | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.4/sle/
9 | repo-sle-update | Update repository with updates from SUS-> | Yes | (r ) Yes | Yes | http://download.opensuse.org/update/leap/15.4/sle/
which pg_config
which: no pg_config in (/sbin:/usr/sbin:/usr/local/sbin:/root/.local/bin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)
zypper search --installed-only | grep postgresql
i | openSUSE-SLE-15.4-2022-1463 | Recommended update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-1895 | Security update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-1908 | Security update for postgresql14 | patch
i | openSUSE-SLE-15.4-2022-2706 | Recommended update for postgresql | patch
i | openSUSE-SLE-15.4-2022-2987 | Security update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-2989 | Security update for postgresql14 | patch
i | openSUSE-SLE-15.4-2022-4447 | Recommended update for postgresql13 | patch
i | openSUSE-SLE-15.4-2022-4645 | Security update for postgresql14, postgresql15 | patch
i | openSUSE-SLE-15.4-2023-83 | Recommended update for postgresql | patch
i | openSUSE-SLE-15.4-2023-569 | Security update for postgresql15 | patch
i | openSUSE-SLE-15.4-2023-583 | Security update for postgresql13 | patch
i | openSUSE-SLE-15.4-2023-705 | Security update for postgresql14 | patch
i | openSUSE-SLE-15.4-2023-2205 | Security update for postgresql14 | patch
i | openSUSE-SLE-15.4-2023-2207 | Security update for postgresql15 | patch
i | openSUSE-SLE-15.4-2023-2219 | Security update for postgresql13 | patch
i | postgresql | Basic Clients and Utilities for PostgreSQL | package
i | postgresql-devel | PostgreSQL development header files and libraries | package
i | postgresql-llvmjit | Just-in-time compilation support for PostgreSQL | package
i | postgresql-llvmjit-devel | Helper package to pull all dependencies to build with llvm support | package
i | postgresql-server | The Programs Needed to Create and Run a PostgreSQL Server | package
i | postgresql-server-devel | PostgreSQL server development header files and utilities | package
i | postgresql13 | Basic Clients and Utilities for PostgreSQL | package
i | postgresql13-devel | PostgreSQL client development header files and libraries | package
i | postgresql13-llvmjit | Just-in-time compilation support for PostgreSQL | package
i | postgresql13-llvmjit-devel | PostgreSQL development files for extensions with LLVM support | package
i | postgresql13-server | The Programs Needed to Create and Run a PostgreSQL Server | package
i | postgresql13-server-devel | PostgreSQL server development header files and utilities | package
i | postgresql14 | Basic Clients and Utilities for PostgreSQL | package
i | postgresql14-llvmjit | Just-in-time compilation support for PostgreSQL | package
i | postgresql14-server | The Programs Needed to Create and Run a PostgreSQL Server | package
zzypper in --no-recommends -f postgresql13 postgresql13-server postgresql13-server-devel
Loading repository data...
Reading installed packages...
Forcing installation of 'postgresql13-13.11-150200.5.40.1.x86_64' from repository 'Update repository with updates from SUSE Linux Enterprise 15'.
Forcing installation of 'postgresql13-server-13.11-150200.5.40.1.x86_64' from repository 'Update repository with updates from SUSE Linux Enterprise 15'.
Forcing installation of 'postgresql13-server-devel-13.11-150200.5.40.1.x86_64' from repository 'Update repository with updates from SUSE Linux Enterprise 15'.
Resolving package dependencies...
The following 3 packages are going to be reinstalled:
postgresql13 postgresql13-server postgresql13-server-devel
3 packages to reinstall.
Overall download size: 7.5 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: postgresql13-13.11-150200.5.40.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15) (1/3), 1.5 MiB
Retrieving: postgresql13-13.11-150200.5.40.1.x86_64.rpm ..................................................................................................................................[done (3.8 MiB/s)]
Retrieving: postgresql13-server-13.11-150200.5.40.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15) (2/3), 4.5 MiB
Retrieving: postgresql13-server-13.11-150200.5.40.1.x86_64.rpm ...........................................................................................................................[done (7.1 MiB/s)]
Retrieving: postgresql13-server-devel-13.11-150200.5.40.1.x86_64 (Update repository with updates from SUSE Linux Enterprise 15) (3/3), 1.4 MiB
Retrieving: postgresql13-server-devel-13.11-150200.5.40.1.x86_64.rpm .....................................................................................................................[done (7.3 MiB/s)]
Checking for file conflicts: .........................................................................................................................................................................[done]
(1/3) Installing: postgresql13-13.11-150200.5.40.1.x86_64 ............................................................................................................................................[done]
(2/3) Installing: postgresql13-server-13.11-150200.5.40.1.x86_64 .....................................................................................................................................[done]
(3/3) Installing: postgresql13-server-devel-13.11-150200.5.40.1.x86_64 ...............................................................................................................................[done]
which pg_config
which: no pg_config in (/sbin:/usr/sbin:/usr/local/sbin:/root/.local/bin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)
zypper in --no-recommends postgresql postgresql-server postgresql-server-devel
Loading repository data...
Reading installed packages...
'postgresql' is already installed.
No update candidate for 'postgresql-15-150400.4.6.2.noarch'. The highest available version is already installed.
'postgresql-server' is already installed.
No update candidate for 'postgresql-server-15-150400.4.6.2.noarch'. The highest available version is already installed.
'postgresql-server-devel' is already installed.
No update candidate for 'postgresql-server-devel-15-150400.4.6.2.noarch'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
ls -lah /usr/bin/pg_config
ls: cannot access '/usr/bin/pg_config': No such file or directory
ls -lah /etc/alternatives/pg_configls -lah /etc/alternatives/pg_config
ls: cannot access '/etc/alternatives/pg_configls': No such file or directory
/usr/bin/pg_config --version
-bash: /usr/bin/pg_config: No such file or directory
/usr/lib/postgresql13/bin/pg_config --version
PostgreSQL 13.11
update-alternatives --list postgresql
/usr/lib/postgresql13
/usr/lib/postgresql14
Interesting…
So everything is correctly installed, but alternatives are no set anymore, or improperly. The fact that you have postgres14 installed is curious too, I wonder where that comes from. It should be fine, though.
Let’s try to set them again: thanks to @phillxnet for reminding all the following about how to do that (as I personally forgot). We indeed had instructions on how to do that in our very first build on openSUSE Leap: Built on openSUSE dev notes and status
In your case, what do you see with the following?
alternatives --config postgresql
You would need to enter the number corresponding to the line for postgresql.
alternatives --config postgresql
There are 2 choices for the alternative postgresql (providing /usr/lib/postgresql).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/postgresql14 140 auto mode
1 /usr/lib/postgresql13 130 manual mode
2 /usr/lib/postgresql14 140 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/postgresql13 to provide /usr/lib/postgresql (postgresql) in manual mode
alternatives --config postgresql
There are 2 choices for the alternative postgresql (providing /usr/lib/postgresql).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/postgresql14 140 auto mode
* 1 /usr/lib/postgresql13 130 manual mode
2 /usr/lib/postgresql14 140 manual mode
Press <enter> to keep the current choice[*], or type selection number:
Re-running the failed commands I now get this
ls -lah /usr/bin/pg_config
lrwxrwxrwx 1 root root 27 Jul 25 18:45 /usr/bin/pg_config -> /etc/alternatives/pg_config
ls -lah /etc/alternatives/pg_configls -lah /etc/alternatives/pg_config
ls: cannot access '/etc/alternatives/pg_configls': No such file or directory
lrwxrwxrwx 1 root root 35 Jul 25 18:45 /etc/alternatives/pg_config -> /usr/lib/postgresql13/bin/pg_config
/usr/bin/pg_config --version
PostgreSQL 13.11
which pg_config
/usr/bin/pg_config
@phillxnet has a very sound explanation as to what might have happened and it relates to the presence of the other postgresql (14) but not all of its packages, in combination with the distribution upgrade (15.3 to 15.4). I’ll let them detail a bit more if/when desired.
Now, you can try to reinstall the rockstor rpm:
zypper in --no-recommends -f rockstor
And look at the poetry install log file to confirm all is well (hopefully): /opt/rockstor/poetry-install.txt.
I was just doing these command and thought I would post it but you beat me to it. Rockstor is up and running and my Rock-ons are now starting up as well.
Seems we have got to the bottom of my system issues nice one and thank you.
Once I get home as I have been doing all this work on the train I will fully test the Rock-ons as at the moment I can’t access them but I can see from docker ps that the docker images are up, Top is also showing lots of activity.
Glad we could work it all out!
Thank you for not only reporting this, but also your help in figuring it all out!
One point: do you remember if you ever manually install postgresql14 on that machine (before or after the move to 15.4)? We’re just trying to see if there is a reproducible scenario that would lead to the situation in which you found yourself.