0

I am struggling to do my release upgrade from Ubuntu 23.04 to 23.10. The release upgrade depends on all packages being upgraded, and one upgrade is held back.

$ sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading

When updating and upgrading all packages, the package libgd3 fails to upgrade

$ sudo apt upgrade
...
The following packages have been kept back:
  libgd3
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

The package depends on a package that is not installable,

The following packages have unmet dependencies:
 libgd3 : Depends: libavif13 (>= 0.9.3) but it is not installable

I have therefore installed libavif13 from source, but to no avail (as I do not know how to indicate the library to apt [and unsure whether this makes sense]). libavif apparently has newer installation candidates, such as libavif15, I have no idea why libgd3 would depend on the outdated libavif13.

I am honestly lost here and would appreciate any hint as to how to resolve this dependency.

Thank you all and cheers

edit: as requested, the output of apt policy libgd3

$ sudo apt policy libgd3
libgd3:
  Installed: 2.3.3-7ubuntu2
  Candidate: 2.3.3-9+ubuntu22.04.1+deb.sury.org+1
  Version table:
     2.3.3-9+ubuntu22.04.1+deb.sury.org+1 500
        500 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 Packages
 *** 2.3.3-7ubuntu2 500
        500 http://xx.archive.ubuntu.com/ubuntu lunar/main amd64 Packages
        100 /var/lib/dpkg/status
  • libavif13 was removed from the Ubuntu repositories after 22.04. The 23.04 version of libgd3 does not have a dependency on libavif13. This suggests that your 23.04 system isn't a clean or "real" 23.04 system at all, since it's still using (some) 22.04 packages. The most common reason for such a discrepancy is a failed or partial release-upgrade in the past. – user535733 Nov 07 '23 at 15:47
  • @user535733, thank you for your answer. I assume that I need to re-install the system to fix the issue? Or do you see an alternative? It seems that a whole lot of my packages depend on the libgd3 package. – Mr.Cave Nov 07 '23 at 16:13
  • 1
    We don't know if a reinstall is needed yet. The first big red flag that leaps out from your apt policy output is that you have a PPA source. PPAs are a common cause of dependency problems. Remove that PPA and see if that helps. Advice: Remove ALL non-Ubuntu sources and packages before a release-upgrade. Those are the #1 cause of release-upgrade problems. – user535733 Nov 07 '23 at 16:46
  • I'm having the exact same issue. The PHP PPA from ondrej only supports LTS Ubuntu releases. You can force it in non-LTS releases, but then it may fail because of missing packages. PHP by ondrej is currently "stuck" at 22.04 version constraints, which do not exist in 23.10 anymore. Usually installing the old packages by hand works fine. I'm trying this currently. – foobar Nov 08 '23 at 06:20
  • I ended up following Arjun's comment and ignored some red flags. It completely broke the operating system. I had to finally reinstall the OS. Luckily I had backups :) – Mr.Cave Nov 08 '23 at 14:19

2 Answers2

1

Ondrej PPA for PHP only supports Ubuntu LTS releases. So it is stuck with 22.04 version constraints, from which some were dropped from Ubuntu 23.10.

You need to manually install these packages from 22.04:

libyuv0
libabsl20210324
libdav1d5
libgav1-0
libavif13
libtiff5

with sudo dpkg -i <deb-file>. The needed deb files can for example be downloaded from there (needs some searching):

http://archive.ubuntu.com/ubuntu/pool/universe/

You can also for example search in the UI on https://ubuntu.pkgs.org/ which will also give you the download location on the ubuntu archive pool. Make sure to pick the correct CPU architecture (most likely amd64 if you are unsure, but dpkg will tell you if you picked the wrong one, it won't screw up).

Then you can install libgd5 using apt. After doing so, I suggest to

sudo apt-mark minimize-manual

Then it will auto cleanup when Ubuntu 24.04 releases and the ondrej PHP PPA will finally be upgraded as well.

foobar
  • 61
0

Let us try some methods,

Since there is a dependency issue, try to manually upgrade the libgd3 package.

sudo apt --with-new-pkgs upgrade libgd3

If it fails you can manually install the package,

sudo apt install libgd3

Hope that fixes your issue!

  • Thank you very much for your comment. I ended up doing this - which I end up not recommending. A lot of packages, including ubuntu-desktop depend on libgd3, which were broken while removing libgd3. So for anyone reading through this: This comment is not the way to do it! Thank you for trying to help though :) – Mr.Cave Nov 08 '23 at 14:16
  • @Mr.Cave Thank you for the information. May I know if the manuall installation worked. – Arjun K Shibu Nov 09 '23 at 15:11