How to fix or re-install the broken packages resulting from updates installation?

23,592

This seems to be an issue with the python3-software-properties package or some of its configuration files, that might be providing inaccurate information to apt-get. I thus suggest you to purge this package:

sudo apt-get purge python3-software-properties

And then install muon:

sudo apt-get install muon

This later command will force a fresh install of python3-software-properties and any other packages muon may depend upon.

For more details on apt-get purge, I suggest this answer.

Share:
23,592

Related videos on Youtube

Sithu
Author by

Sithu

Updated on September 18, 2022

Comments

  • Sithu
    Sithu almost 2 years

    I recently installed Kubuntu 14.04 and I installed available updates. Then, I got a black screen with mouse pointer visible. I lost my desktop. However I got to terminal with Ctrl+Alt+F1. Then I ran sudo apt-get install kubuntu-desktop. It gave me my desktop back.

    Unfortunately, I found that some applications were broken and missing such as muon, dolphin, kontact, ktp-contactlist, etc. I tried several tips about package and apt commands. Nothing worked. sudo apt-get update and sudo apt-get upgrade did not solve the problem. Nothing was upgraded.

    I could successfully installed dolphin by running sudo apt-get install dolphin. But I failed with muon and kontact. The below is what I tried for muon.

    sithu@sithu-kubuntu:~$ sudo apt-get install muon
    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:
    muon : Depends: libmuonprivate2 (= 2.2.0-0ubuntu3) but it is not going to be installed
        Recommends: muon-updater but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

    I tried to install libmuonprivate2, but it depends on software-properties-kde.

    sithu@sithu-kubuntu:~$ sudo apt-get install libmuonprivate2
    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:
    libmuonprivate2 : Depends: software-properties-kde but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

    I tried to install software-properties-kde, but it depends on python3-software-properties.

    sithu@sithu-kubuntu:~$ sudo apt-get install software-properties-kde
    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:
    software-properties-kde : Depends: python3-software-properties (= 0.92.36) but 0.92.37.1 is to be installed
    E: Unable to correct problems, you have held broken packages.
    

    I tried to install python3-software-properties, but it seems update-to-date.

    sithu@sithu-kubuntu:~$ sudo apt-get install python3-software-properties
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    python3-software-properties is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    I also tried to locate and re-install broken packages using Synaptic Package Manager, but no luck. Applying the changes gave me this dialog:

    Could not apply changes!
    Fix broken packages first.
    

    "Fix broken packages" gave me this dialog:

    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    E: Unable to correct dependencies
    

    Any help would be highly appreciated.

    • Byte Commander
      Byte Commander over 9 years
      Would you try sudo apt-get check and sudo apt-get -f install (without package)?
    • Sithu
      Sithu over 9 years
      @ByteCommander apt-get check nothing gave me. apt-get -f install gave me 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded..
    • Luís de Sousa
      Luís de Sousa over 9 years
      This seems to be an issue with python3-software-properties but it is not easy to say what. Could you try to purge it and then install muon?
    • Sithu
      Sithu over 9 years
      @LuísdeSousa Oh yes! apt-get purge python3-software-properties and apt-get install muon reinstalled muon successfully. It also solved another problem of kdeplasma-addons re-installation. If you add an answer for this, I will accept it. It will be great if you could add the reason of purge. However, it is difficult to fix the packages which have a lot dependencies such as kontact. Please check what I did with kontact. Is there any better way to solve this.
    • SY_13
      SY_13 over 8 years
      I still get the same error when I run both the commands
  • Sithu
    Sithu over 9 years
    Thanks for your answer. Is it the only way to figure out the unmet dependencies deeply down one by one? Is there any other quicker and easier way to fix those broken packages?
  • Sithu
    Sithu over 9 years
    Yes, -f did not work for me. Even in Muon Package Manager, there is no broken packages listed :(
  • SY_13
    SY_13 over 8 years
    I get the unmet dependencies error again