Software Installation – How to Install Wine and PlayOnLinux

aptpackage-managementplayonlinuxsoftware installationwine

I am in elementary OS Freya.

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 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And:

 sudo apt-get install playonlinux
    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:
     playonlinux : Depends: wine or
                            wine-unstable but it is not installable
    E: Unable to correct problems, you have held broken packages.

While all PPAs are disabled and Ubuntu repos are enabled:

enter image description here

enter image description here

Otherwise there isn't any problem with the packages:

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

After following instructions from askubuntu,

  sudo apt-get -u dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So, no fail here.

But the initial error persists in terminal.

What happens in Synaptic is different!
When trying to install playonlinux the packages to be removed included all my system so to speak. That would have completely broken the system. It is too long a list to post here.

When trying to install wine, it seems possible
enter image description here

but this is contradicted by the terminal output posted above for sudo apt-get install wine, and all this looks fishy to me.


UPDATE

Trying to install wine in Synaptic, it does not work in fact: once selected to be installed, the wine package is marked as broken and some unmentioned packages are signaled as broken.

enter image description here


How to identify the broken packages? Is it possible they being signaled as broken to be an error?

Best Answer

The main idea is to use aptitude and its larger options.

The answer follows this one on ubuntuforums.

  • Made /etc/apt/sources.list support multiarch by adding [arch=amd64,i386] to the deb-line:

deb [arch=amd64,i386] http://fr.archive.ubuntu.com/ubuntu/ trusty universe

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo dpkg --add-architecture i386
sudo apt-get update

Update of the database now showed separate amd64 and i386 repos to be loaded.

Next I switched to aptitude, because of the more sophisticated dependency-solver:

sudo apt-get install aptitude

sudo aptitude --full-resolver -f install wine1.7

Full details: http://pastebin.com/Z9Ww11SU

What I did in short:

  • aptitude suggested a solution where wine1.7 would not be installed, that was selected first (20)
  • This solution was rejected with r 20 -- it was a bit complicated for me, I just replicated the commands from the other answer: first selected 20 instead of YES or NO; then r 20 (rejecting the removal of Wine 1.7);
  • then n (It seems that unless you choose Y, YES, aptitude --full-resolver gives you new options after each decision; I guess in this case was NO because it said "dependencies unresolved" for Wine);
  • the next step provided the good solution: to install Wine and to downgrade 14 packages:

ibasn1-8-heimdal libgphoto2-6 libgphoto2-port10 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal liblcms2-2 libroken18-heimdal libsane libsane-common libwind0-heimdal

  • So, last one was Y YES, and Wine 1.7 was installed.

  • After that, the installation of playonlinux went without problems:

The following NEW packages will be installed:
  libwxgtk-media2.8-0{a} mesa-utils{a} playonlinux python-wxgtk2.8{a} python-wxversion{a} 
0 packages upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Related Question