4

When performing sudo apt upgrade I get the following error message:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libcurl4 : Conflicts: libcurl3 but 7.60.0-1 is to be installed
E: Broken packages

I understand this to mean:

  • You have previously installed package X, which relies on libcurl4 (so libcurl4 is already installed).
  • Your upgrade includes a package Y with a new dependency on libcurl3 (version 7.60.0-1).
  • libcurl3 cannot be installed because it conflicts with libcurl4.

I used GNOME Packages to look at the lists of packages that require libcurl3 and libcurl4, but the lists are very long and can't be narrowed down (specifically, they don't indicate which packages are already installed or which are about to be installed).

I tried apt debugging but it doesn't seem to add any information:

$ sudo apt -o Debug::pkgProblemResolver=yes upgrade                                                                                                           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Entering ResolveByKeep 10%
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
Keeping package libcurl4:amd64
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
Package libcurl4:amd64 libcurl4:amd64 Conflicts on libcurl3:amd64 < none -> 7.60.0-1 @un uN >
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
  Dependencies are not satisfied for libcurl4:amd64 < 7.60.0-2 @ii mK Ib >
Calculating upgrade... Done
<repeats previous error message>

How can I identify package X (the existing package) and package Y (the new package, or an existing package with a new dependency)?

2
  • 1
    I think you mixed different repositories. Jul 30, 2018 at 12:14
  • @IporSircer I do have multiple repos (that should be non-conflicting), but how can I identify the packages causing the conflict?
    – lofidevops
    Jul 30, 2018 at 12:15

2 Answers 2

4

To identify packages causing conflicts (or other issues) during a package upgrade, I find the most helpful approach is to enable the resolver’s debugging mode:

apt -o Debug::pkgProblemResolver=yes upgrade

This will show you all the problems the resolver runs into, along with the packages which caused it to consider the problematic dependencies.

2
  • this looks promising, but my results (see updated question) don't mention any new packages -- is this a peculiarity of my situation?
    – lofidevops
    Jul 30, 2018 at 14:50
  • No, upgrades typically don’t install new packages, unless they’re pulled in as new dependencies (and you’re using apt or aptitude rather than apt-get). I imagine you’re running testing or unstable and got caught partway through the libcurl3 to libcurl4 transition. Jul 30, 2018 at 20:57
2

Another take to add to @StephenKitt excelent answer is installing and using aptitude.

aptitude is usually a bit smarter managing packages and specially helping and suggesting alternatives when there are conflicts.

The usage is also very similar to apt as in using, aptitude install, aptitude update and aptitude upgrade. If you call aptitude without arguments, it will invoke a text menu interface.

From man aptitude

aptitude - high-level interface to the package manager

aptitude is a text-based interface to the Debian GNU/Linux package system.

It allows the user to view the list of packages and to perform package management tasks such as installing, upgrading, and removing packages. Actions may be performed from a visual interface or from the command-line.

For more details see aptitude - Command-line reference

2
  • 1
    aptitude upgrade gets most packages installed as you suggested, it reports "1 will not be upgraded" but doesn't say which one?
    – lofidevops
    Jul 30, 2018 at 14:54
  • Odd, it shoud say it....do you have the output? Jul 30, 2018 at 18:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .