wine: Depends wine1.6 or wine1.8 but it is not going to be installed, you have held broken packages

12,834

I am using Ubuntu 16.04 LTS (64-bit) and encountered the same error, "E: Unable to correct problems, you have held broken packages." while trying to install mysql-workbench.

I solved the problem by doing the following:

  1. sudo apt autoremove (remove packages that are no longer needed)
  2. sudo apt-get update
  3. sudo apt-get install package-name (e.g. wine, mysql-workbench, etc.)

Hope it works for you.

Share:
12,834

Related videos on Youtube

theoneabhinav
Author by

theoneabhinav

I am just a beginner in computer world who loves to code and learn new stuff. and keep messing up my laptop with different experiments :).

Updated on September 18, 2022

Comments

  • theoneabhinav
    theoneabhinav over 1 year

    I want to install wine on Ubuntu 16.04, but I am getting errors:

    $ sudo apt-get install wine
    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:
     wine : Depends: wine1.6 or
                     wine1.8 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

    Also tried this:

    $ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    I followed the answers to Unable to correct problems, you have held broken packages and ran the following command.

    dpkg --get-selections | grep hold
    

    But there was no output.

    After that I also tried dpkg --get-selections to see all the packages. There were some with "deinstall" so I ran the following:

    $ dpkg --get-selections | grep deinstall
    ca-certificates-mono            deinstall
    libevent-2.0-5:amd64            deinstall
    libgdata2.1-cil                 deinstall
    libglib2.0-cil                  deinstall
    libgtk2.0-cil                   deinstall
    libmx-1.0-2:amd64               deinstall
    libnewtonsoft-json5.0-cil       deinstall
    mono-runtime-common             deinstall
    nvidia-304                      deinstall
    nvidia-opencl-icd-304           deinstall
    tlp                             deinstall
    tlp-rdw                         deinstall
    transmission-gtk                deinstall
    xserver-xorg-legacy             deinstall
    

    But these packages cannot be uninstalled. I have also tried answers given to How do I resolve unmet dependencies after adding a PPA? and this one but it has not resolved anything.

    I have also tried using Aptitude, but the problem is still the same.

    I also tried with Synaptic package manager. it is also unable to resolve the dependencies.

    could not apply changes, fix broken packages first

    I have also tried the following commands:

    sudo aptitude -f install wine
    sudo apt-get dist-upgrade
    sudo apt-get update
    dpkg --get-selections | grep hold
    dpkg --get-selections
    dpkg --get-selections | grep deinstall
    sudo apt-get clean
    sudo apt-get autoclean
    sudo dpkg --configure -a
    sudo aptitude -f install wine
    sudo apt-get -f install wine
    

    But none of them fixed it.

    What else can I try?

    • AzkerM
      AzkerM over 7 years
      What happens when you try sudo apt-get install -f? Post the output of it instead of pictures.
    • theoneabhinav
      theoneabhinav over 7 years
      @AzkerM have updated the answer . it is giving me same output on dist-upgrade as well.
    • AzkerM
      AzkerM over 7 years
      Is this only for wine package or for everything? Can you try sudo apt-get update and then refer to this post
    • theoneabhinav
      theoneabhinav over 7 years
      It is giving me same results for all. I am unable to install even .deb packages. Have gone through that page as well. But it won't work as nothing is installing or updating.
  • theoneabhinav
    theoneabhinav over 7 years
    i tried this . but it still doesn't work. its giving me the same output as before.