centos postgre

CENTOS and Postgre Updating Problems and Possible Fix

Linux Blog Information Technology

Recently I’ve been trying to decide what operating system to migrate CENTOS to. I’ve discovered that Rocky Linux might be the answer to many of the Linux CENTOS users out there.

With a smooth transition testing CENTOS 8 to Rocky 8 using the migrate steps listed. It was time to try my hand at updating a production server.

I ran into numerous problems as the script will not work if there are updates that broken or causing problems.

The main one I dealt with was POSTGRE the database that Netbox used. Whenever I would type in the command

  • dnf update

I would get all kinds of prompts similar to what you will see below.

Errors when updating CENTOS

  • package postgresql 14-devel-14.0-1PGDG.rhel8.x86_64 requires postgresql 14(x86-64) = 14.0-1PGDG.rhel8, but none of the providers can be installed

After research and multiple retries and screw ups. I was finally able to get it to install correct and how it should install.

Apparently CENTOS/RHEL use a certain version of POSTGRE and it does not update like it should.

Similar Errors while updating POSTGRE and CENTOS

Problem: problem with installed package llvm-devel-10.0.1-3PGDG.el8.x86_64
  - package llvm-devel-10.0.1-3PGDG.el8.x86_64 requires llvm-libs(x86-64) =
10.0.1-3PGDG.el8, but none of the providers can be installed
  - package llvm-devel-10.0.1-3PGDG.el8.x86_64 requires
libLLVM-10.so()(64bit), but none of the providers can be installed
  - package llvm-devel-10.0.1-3PGDG.el8.x86_64 requires
libLLVM-10.so(LLVM_10)(64bit), but none of the providers can be installed
  - cannot install both llvm-libs-11.0.0-2.el8.x86_64 and
llvm-libs-10.0.1-3PGDG.el8.x86_64
  - package llvm-devel-11.0.0-2.el8.x86_64 requires llvm-test(x86-64) =
11.0.0-2.el8, but none of the providers can be installed
  - package postgresql12-llvmjit-12.7-2PGDG.rhel8.x86_64 requires
libLLVM-11.so()(64bit), but none of the providers can be installed
  - package postgresql12-llvmjit-12.7-2PGDG.rhel8.x86_64 requires
libLLVM-11.so(LLVM_11)(64bit), but none of the providers can be installed
  - package llvm-test-11.0.0-2.el8.x86_64 requires python3-lit, but none of
the providers can be installed
  - cannot install the best candidate for the job
  - package llvm-libs-11.0.0-2.module_el8.4.0+587+5187cac0.x86_64 is
filtered out by modular filtering
  - package python3-lit-0.11.0-1.module_el8.4.0+587+5187cac0.noarch is
filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages
or '--skip-broken' to skip uninstallable packages or '--nobest' to use not
only best candidate packages)

Resolve the CENTOS POSTGRE problems

Now it needs to be said just cause it worked for me, it might not work for you.

But, below are the steps I took to get my system stable, and was able to complete my migration.

It is highly recommended that you have a backup of your system before applying any of this. This is also all performed in the command line. I would also suggest you either connect to your system and open up a terminal, or login using SSH.

First let’s try to update your system already. Let’s go ahead and switch to root, and run updates.

sudo su
sudo dnf update

If the POSTGRE errors pop up like they do above its time to enter the rest of the commands.

The first thing we are going to do, is install the the correct repo for postgre to update correctly.

sudo dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

After that this is the command that I believe solved all my issues.

sudo dnf -qy module disable postgresql

Now, we need to clear up our updates.

sudo dnf check-update

After check the updates let’s update.

sudo dnf update

If you system updates correctly and you are no longer getting the warning you should be good to go.

I would check whatever service you are running that uses POSTGRE and make sure it is operating correctly.

Go ahead and reboot the server or workstation.

After this I was successfully able to migrate over to Rocky Linux with no issues! Everything is running and is stable as it was on CentOS!