I've just upgraded to Ubuntu 24.04 from 23.10. As usual, the upgrade removed all GDAL (which was working perfectly). So under 24.04 I had to reinstall. I could install gdal-bin etc without problems, but I get this when I try to install libgdal-dev:

The following packages have unmet dependencies.
 unixodbc-dev : Depends: libodbc2 (= 2.3.12-1build2) but 2.3.12-1ubuntu0.23.10.1 is to be installed
                Depends: libodbccr2 (= 2.3.12-1build2) but it is not going to be installed

I've tried removing all of the rest of GDAL before trying to install libgdal-dev, trying with and without the ubuntugis-stable and ubuntugis-unstable PPAs enabled, tried installing from downloaded debs for libgdal-dev (versions 3.8.3, 3.8.4, and 3.8.5). No luck with any of these. The strange thing is that I can't find any mention of anyone else having the same problem. So it seems likely that it is something strange about just my machine.

Anyone got any suggestions as to what I can try next?

I get the same error message when trying to install grass-dev.

  • Looks like you still have some source repo or PPA enabled with "mantic" (i.e. 23.10) listed instead of "noble". Unrelated, but don't use ubuntugis on anything other than LTS releases, they only provide PPAs for LTS. However, they don't have packages for 24.04 yet anyway. Fix or disable PPAs and use synaptic to revert gdal related packages to only those provided by 24.04.
    – user2856
    Commented May 23 at 10:39
  • grep -r -i 'mantic' /etc/apt/sources.list /etc/apt/sources.list.d
    – user2856
    Commented May 23 at 10:45
  • Thanks for the suggestion. I had a look in /etc/apt/sources.list and /etc/apt/sources.list.d as you suggested, and found a mention of mantic in dropbox.list.distUpgrade. Removed dropbox.list.distUpgrade but alas, I still get the same libodbc2/libodbcc2 dependency error when trying to install libgdal-dev. O well. Commented May 23 at 17:49
  • Thanks too for the info re only LTS releases on ubuntugis, didn't know that. Commented May 23 at 17:51
  • Re having only gdal-related packages as provided by 24.04, here is what I currently have installed: gdal-bin/noble,now 3.8.4+dfsg-3ubuntu3 amd64 [installed,automatic] gdal-data/noble,noble,now 3.8.4+dfsg-3ubuntu3 all [installed,automatic] gdal-plugins/noble,now 3.8.4+dfsg-3ubuntu3 amd64 [installed,automatic] libgdal34t64/noble,now 3.8.4+dfsg-3ubuntu3 amd64 [installed,automatic] python3-gdal/noble,now 3.8.4+dfsg-3ubuntu3 amd64 [installed,automatic] Those are all the versions as supplied by 24.04 (aren't they?), but still I can't install libgdal-dev. Commented May 23 at 17:52

1 Answer 1


I had to downgrade the version of libodbc2. The version that was installed was 2.3.12-1ubuntu0.23.10.1 (I have no idea why: presumably from the 23.10 -> 24.04 upgrade)

What was needed was 2.3.12-1build2 according to 1. So to do the downgrade:

sudo apt-get install libodbc2=2.3.12-1build2

Hopefully this will be useful to anyone else who gets the same problem :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.