Kali Error while installing any package

17,494

I encountered the same problem and solved it by

  • going to /var/lib/dpkg/status
  • clearing the contents (these are dependencies in that file)
  • running
    apt update && apt install -f
    

enter image description here

Share:
17,494
Parampreet Rai
Author by

Parampreet Rai

Updated on September 18, 2022

Comments

  • Parampreet Rai
    Parampreet Rai almost 2 years

    I had recently installed kali from parrot.

    After Successful installation. I run

    sudo apt-get update
    sudo apt upgrade
    

    Now I am unable to install any package. It shows me error:

    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:
     gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.30.2-7 is to be installed
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    

    When I try to run sudo apt full-upgrade, Another error:

     libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed
    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
    

    This is my /etc/apt/sources.list:

    http://http.kali.org/kali kali-last-snapshot main non-free contrib
    

    And, ''apt-cache policy mutter'':

    mutter:
      Installed: 3.30.2-7
      Candidate: 3.36.4-1
      Version table:
         3.36.4-1 500
            500 http://http.kali.org/kali kali-rolling/main amd64 Packages
     *** 3.30.2-7 100
            100 /var/lib/dpkg/status
    

    Please Help. Is anything extra I had to Post?

  • AdminBee
    AdminBee almost 4 years
    Welcome to the site. Would you mind adding some explanation on why simply installing mutter and gcc-8 would resolve the OPs problem, although there is an indication of version conflicts?
  • AdminBee
    AdminBee over 3 years
    Welcome to the site. Please don't post screenshots of console output. They are often difficult to read, and the content will not be accessible to google search results. Instead, paste it into the question using code formatting.
  • ctrl-alt-delor
    ctrl-alt-delor over 3 years
    Images of text are also not readable by blind people.