DNF update problem

I am using the latest Fedora 38 on my 64-bit Intel machine. Here is what I am getting:

# dnf clean all
[...]
# dnf update
Last metadata expiration check: 0:00:14 ago on Tue 24 Oct 2023 09:14:12 AM CDT.
Dependencies resolved.

 Problem: package libpq-devel-15.3-1.fc38.x86_64 from @System requires libpq(x86-64) = 15.3-1.fc38, but none of the providers can be installed
  - package libpq5-16.0-42PGDG.f38.x86_64 from pgAdmin4 obsoletes libpq provided by libpq-15.3-1.fc38.x86_64 from @System
  - package libpq5-16.0-42PGDG.f38.x86_64 from pgAdmin4 obsoletes libpq provided by libpq-15.3-1.fc38.x86_64 from updates
  - cannot install the best update candidate for package libpq-devel-15.3-1.fc38.x86_64
  - cannot install the best update candidate for package libpq-15.3-1.fc38.x86_64
Nothing to do.
Complete!
#

This has been going on for at least a week. Sure appreciate any help.

Thanks!

I do not see libpq5-16.0-42PGDG.f38.x86_64 available to install.
what does dnf info libpq5-16.0-42PGDG.f38.x86_64 report?

Also you could try dnf update --refresh the --refresh makes sure that you looking at up to date RPM meta data.

1 Like

Thanks Barry! Here is what I’ve got:

# dnf info libpq5-16.0-42PGDG.f38.x86_64
Last metadata expiration check: 2:25:22 ago on Tue 24 Oct 2023 09:14:12 AM CDT.
Available Packages
Name         : libpq5
Version      : 16.0
Release      : 42PGDG.f38
Architecture : x86_64
Size         : 258 k
Source       : libpq5-16.0-42PGDG.f38.src.rpm
Repository   : pgAdmin4
Summary      : PostgreSQL Client Library
URL          : https://www.postgresql.org/
License      : PostgreSQL
Description  : The libpq5 package provides the essential shared libraries for any
             : PostgreSQL client program or interface. You will need to install this package
             : to use any other PostgreSQL package or any clients that need to connect to a
             : PostgreSQL server.

# dnf update --refresh
Brave Browser                                                                                                                6.0 kB/s | 3.3 kB     00:00    
Fedora 38 - x86_64                                                                                                            60 kB/s |  25 kB     00:00    
Fedora 38 openh264 (From Cisco) - x86_64                                                                                     2.4 kB/s | 989  B     00:00    
Fedora Modular 38 - x86_64                                                                                                    69 kB/s |  25 kB     00:00    
Fedora 38 - x86_64 - Updates                                                                                                  39 kB/s |  23 kB     00:00    
Fedora Modular 38 - x86_64 - Updates                                                                                          38 kB/s |  24 kB     00:00    
google-chrome                                                                                                                3.1 kB/s | 1.3 kB     00:00    
pgadmin4                                                                                                                     496  B/s | 833  B     00:01    
created by dnf config-manager from https://repo.nordvpn.com//yum/nordvpn/centos/x86_64                                       6.0 kB/s | 2.5 kB     00:00    
RPM Fusion for Fedora 38 - Free                                                                                              4.7 kB/s | 3.4 kB     00:00    
RPM Fusion for Fedora 38 - Free - Updates                                                                                    6.7 kB/s | 3.2 kB     00:00    
RPM Fusion for Fedora 38 - Nonfree                                                                                           9.5 kB/s | 6.6 kB     00:00    
RPM Fusion for Fedora 38 - Nonfree - Updates                                                                                  14 kB/s | 6.1 kB     00:00    
Dependencies resolved.

 Problem: package libpq-devel-15.3-1.fc38.x86_64 from @System requires libpq(x86-64) = 15.3-1.fc38, but none of the providers can be installed
  - package libpq5-16.0-42PGDG.f38.x86_64 from pgAdmin4 obsoletes libpq provided by libpq-15.3-1.fc38.x86_64 from @System
  - package libpq5-16.0-42PGDG.f38.x86_64 from pgAdmin4 obsoletes libpq provided by libpq-15.3-1.fc38.x86_64 from updates
  - cannot install the best update candidate for package libpq-devel-15.3-1.fc38.x86_64
  - cannot install the best update candidate for package libpq-15.3-1.fc38.x86_64
Nothing to do.
Complete!
#

I use PostgreSQL.

It appears that you have installed a 3rd party repo, “pgAdmin4” that conflicts with the Fedora repos.

You have three options:

  • Fedora already ships pgadmin4 in the repos already, so remove the pgadmin4 repo you installed and sudo dnf distro-sync and just use the Fedora shipped pgAdmin
  • If you really want to prefer that repo over the Fedora updates, then you can try adding excludepkgs=pgadmin4*,libpq5,libpq-devel to /etc/yum.repos.d/fedora-updates.repo with the understanding that updates to those packages will come from the pgadmin4 repo and not Fedora updates at that point and this may or may not cause issues with major version upgrades
  • Run pgadmin4 in a container from the upstream vendor of your choosing and side-step dnf repo conflicts entirely.
2 Likes

Thanks, Scott. I removed the pgadmin repo stuff. (I don’t use pgAdmin anymore anyway.) Problem solved. Thank you very much!

What is this repo? Does not sound like a fedora repo.

No. I think it is hosted by the pgAdmin group. I think I was using pgAdmin and found a bug. I then noticed that the pgAdmin group had a slightly later version so I installed that. I don’t think it actually fixed the bug I found though.

This is a perfect example of why a user should not just enable and leave enabled a 3rd party repo – particularly one that is used primarily by developers.

Having such a repo enabled often causes the dependency issues seen here.

It is quite normal for a user to assist in tracking bugs, but something else entirely to leave such a repo enabled and forget about it until the dependencies crop up in another situation – such as a routine update.

1 Like

There’s also a method that allows to always prioritize the official repositories for all packages, assuming you don’t need to override them:

sudo dnf config-manager --save \
    --setopt fedora.priority=0 \
    --setopt updates.priority=0 \
    --setopt updates-testing.priority=0

Sorry, Jeff. I’ll try to do better in the future.

Thanks, Vladislav!

1 Like

No problem. That was meant as a reminder to everyone, not a criticism.

Thanks, Jeff!

1 Like