In Ubuntu 18.04 (Cinnamon), the package cpp-7
depends precisely on version 7.3.0-27ubuntu1~18.04
of package gcc-7-base
:
$ aptitude why gcc-7-base
i cpp-7 Depends gcc-7-base (= 7.3.0-27ubuntu1~18.04)
Meanwhile, the package libgfortran4
depends precisely on version 7.3.0-16ubuntu3
of the same package gcc-7-base
:
$ apt-cache show libgfortran4
Package: libgfortran4
...
Depends: gcc-7-base (= 7.3.0-16ubuntu3), libc6 (>= 2.27), libgcc1, libquadmath0
and libgfortran4
won't install if I have the other version of the package already installed:
$ sudo apt-get install libgfortran4
...
The following packages have unmet dependencies:
libgfortran4 : Depends: gcc-7-base (= 7.3.0-16ubuntu3) but 7.3.0-27ubuntu1~18.04 is to be installed
Depends: libquadmath0 but it is not going to be installed
cpp-7
is in the dependency graph of ubuntu-desktop
. libgfortran4
is in the dependency graph of gimp
. Doesn't this imply that no one can ever install GIMP from the repositories on Ubuntu 18.04? Please correct me if I'm wrong, but I certainly can't.
To make the matter even more maddening, apt-cache showpkg
shows that the two different versions of gcc-7-base
come from the same repository and have the same MD5 hash:
$ apt-cache showpkg gcc-7-base
Package: gcc-7-base
Versions:
7.3.0-27ubuntu1~18.04 (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages
MD5: b6e93638a6d08ea7a18929d7cf078e5d
...
7.3.0-16ubuntu3 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages
MD5: b6e93638a6d08ea7a18929d7cf078e5d
meaning (again, correct me if I'm wrong) that they're the exact same code. So, there isn't an actual dependency conflict here, only one of labels.
How does this happen and how do I fix it? For example, is there a way for me to tell either cpp-7
or libgfortran4
that it's okay to accept the other version of gcc-7-base
, because it's the exact same code? Do I need to get the package maintainer(s) involved?
Edit: A few days ago I posted a question on this topic. The current question is the narrowed-down result of work I've done on it in the meantime.
Edit: These are my active sources:
$ grep -Ev '(^#|^ *$|deb-src)' /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
/etc/apt/sources.list:deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/keybase.list:deb http://prerelease.keybase.io/deb stable main
/etc/apt/sources.list.d/keybase.list.save:deb http://prerelease.keybase.io/deb stable main
/etc/apt/sources.list.d/vscode.list~:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
There's a commented deb-src
for updates,
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
but nothing commented or uncommented for updates that's just deb
. Should I add a line
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
?
Edit: Adding
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
to my /etc/apt/sources.list
file, then $ sudo apt-get update
worked. GIMP installed as expected with $ sudo apt-get install gimp
. Thank you all!
aptitude
suggests downgrading a bunch of packages to 16.04 versions, which I think is an unreasonable solution that's bound to cause more problems than it solves, especially since there's apparently no actual conflict in the code of 18.04 package versions in this case. – Darien Marks Dec 02 '18 at 14:59