How do I resolve package conflicts between Ubuntu and GIMP?

This kind of issue is usually fixed by a simple apt update.

Let's see why by querying the madison database for the available 18.04 versions of gcc-7-base and libgfortran4.

$ rmadison gcc-7-base
 gcc-7-base | 7.3.0-16ubuntu3       | bionic         | amd64, arm64, armhf, i386, ppc64el, s390x
 gcc-7-base | 7.3.0-27ubuntu1~18.04 | bionic-updates | amd64, arm64, armhf, i386, ppc64el, s390x

$ rmadison libgfortran4
 libgfortran4 | 7.3.0-16ubuntu3       | bionic         | amd64, arm64, armhf, i386, ppc64el, s390x
 libgfortran4 | 7.3.0-27ubuntu1~18.04 | bionic-updates | amd64, arm64, armhf, i386, ppc64el, s390x

You can see that libgfortran4 is the bionic (non-updates) version, and has the bionic (non-updates) dependency. gcc-7-base, on the other hand uses the newer bionic-updates dependency.

There are two common reasons for this kind of de-sync between a base repository and it's corresponding -updates repository on a single system.

  1. The user has recently disabled the -updates repository. Easy enough to check and fix in /etc/apt/sources.list or your Software and Sources control panel.

  2. The user simply hasn't run apt update in a while to refresh (update) apt's local database of available packages from both sources. That's an easy fix, too.

Your file /etc/apt/sources.list should have some combination of mirrors and sources that adds up to:

deb [mirror URL] bionic main
deb [mirror URL] bionic-updates main
deb [mirror URL] bionic-security main

The optional universe, multiverse, and restricted repos can be included on the same lines.


Another option is to install the snap version of GIMP. I realize some folks don't like snaps, but this may be a more palatable solution for the casual Linux user.

sudo snap install gimp