0

I keep getting Unable to correct problems, you have held broken packages. when I try to install packages. I am trying the command: sudo apt-get install python-pip libffi-dev libssl-dev and I get

Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
 libffi-dev : Depends: libffi6 (= 3.2.1-4) but 3.2.1-8 is to be installed
 libssl-dev : Depends: libssl1.0.0 (= 1.0.2g-1ubuntu4.15) but 1.0.2n-1ubuntu5.1 is to be installed
              Depends: zlib1g-dev but it is not going to be installed
              Recommends: libssl-doc but it is not going to be installed
 python-pip : Depends: python:any (< 2.8)
              Depends: python:any (>= 2.7.5-5~)
              Recommends: python-all-dev (>= 2.6) but it is not going to be installed
              Recommends: python-setuptools but it is not going to be installed
              Recommends: python-wheel but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried searching, but nothing worked. I tried apt-mark showhold. The command did not return anything. I tried apt-mark unhold * and got:

E: Unable to locate package libpython2.7-minimal_2.7.15~rc1-1ubuntu0.1_s390x.deb
E: Couldn't find any package by glob 'libpython2.7-minimal_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Couldn't find any package by regex 'libpython2.7-minimal_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Unable to locate package libpython2.7-stdlib_2.7.15~rc1-1ubuntu0.1_s390x.deb
E: Couldn't find any package by glob 'libpython2.7-stdlib_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Couldn't find any package by regex 'libpython2.7-stdlib_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Unable to locate package libpython2.7_2.7.15~rc1-1ubuntu0.1_s390x.deb
E: Couldn't find any package by glob 'libpython2.7_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Couldn't find any package by regex 'libpython2.7_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Unable to locate package python2.7-minimal_2.7.15~rc1-1ubuntu0.1_s390x.deb
E: Couldn't find any package by glob 'python2.7-minimal_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Couldn't find any package by regex 'python2.7-minimal_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Unable to locate package python2.7_2.7.15~rc1-1ubuntu0.1_s390x.deb
E: Couldn't find any package by glob 'python2.7_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: Couldn't find any package by regex 'python2.7_2.7.15~rc1-1ubuntu0.1_s390x.deb'
E: No packages found

This is the content of /etc/apt/sources.list il.ports.ubuntu.com/ubuntu-ports/ xenial main restricted il.ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted il.ports.ubuntu.com/ubuntu-ports/ xenial universe il.ports.ubuntu.com/ubuntu-ports/ xenial-updates universe il.ports.ubuntu.com/ubuntu-ports/ xenial multiverse il.ports.ubuntu.com/ubuntu-ports/ xenial-updates multiverse il.ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe multiverse ports.ubuntu.com/ubuntu-ports xenial-security main restricted ports.ubuntu.com/ubuntu-ports xenial-security universe ports.ubuntu.com/ubuntu-ports xenial-security multiverse

/etc/apt/sources.list.d contains: gingerbase-source.list kimchi-source.list gingerbase-source.list.distUpgrade kimchi-source.list.distUpgrade

Can someone please help me resolve this?

  • "Held broken packages" does not mean you have held packages or broken packages. It means that you have broken apt's logic by introducing a version conflict. You have instructed apt to install packages that require different versions of the same dependency...which is the "impossible situation" that apt is complaining about. In most cases, this means you unwisely installed packages from some non-Ubuntu or wrong-version source. – user535733 May 28 at 11:25
  • The usual solution is to uninstall all packages from that unwise source. That will cure the problem. Then delete the source, so you don't re-add the conflicting packages. – user535733 May 28 at 11:26
  • have you added some non-official package sources or ppas? Please tell us which. – noeppi noeppi May 28 at 11:28
  • As far as I know, I haven't added anything unofficial, but I may be wrong. – Gadi Ben-Avi May 28 at 11:40
  • @GadiBen-Avi Please edit your question to add the contents of /etc/apt/sources.list and the files in /etc/apt/sources.list.d (if any) to prove that. Paste the text directly to your question and apply code formatting. – Melebius May 28 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.