How to fix installation wine on ubuntu 14.04.3LTS 64 bit

I knew there are a lot of questions about wine but i can't find or fix with there answers. Can someone help me to fix installation about Wine please.

Here are the command output while trying to fix it:

  1. sudo dpkg --add-architecture i386

    sudo apt-get 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.
    
  2. sudo apt-get update

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

    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:
     wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu4)
    E: Unable to correct problems, you have held broken packages.
    
  5. sudo apt-get install wine1.6:i386

    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:
     wine1.6:i386 : Depends: wine1.6-i386:i386 (= 1:1.6.2-0ubuntu4)
                    Recommends: winbind:i386 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

I have also tried:

  • Trouble downloading packages list due to a “Hash sum mismatch” error
  • How to fix Duplicate sources.list entry?

  • Update 1

    Fixed all sudo apt-get update erros
    But still can't sudo apt-get install wine

  • Update 2

    As @Sneetsher mention to me.

    The output of the last command, Same like output of step 3

  • Update 3

    Per @A.B. request.

    uname -a

    Linux bad 3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    

    lsb_release -a

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.3 LTS
    Release:    14.04
    Codename:   trusty
    

    apt-cache policy wine wine1.6 wine1.7

    wine:
      Installed: (none)
      Candidate: 1:1.7.55-0ubuntu1
      Version table:
         1:1.7.55-0ubuntu1 0
            500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ trusty/main amd64 Packages
         1:1.6.2-0ubuntu4 0
            500 http://mirrors.163.com/ubuntu/ trusty/universe amd64 Packages
    wine1.6:
      Installed: (none)
      Candidate: 1:1.6.2-0ubuntu4
      Version table:
         1:1.6.2-0ubuntu4 0
            500 http://mirrors.163.com/ubuntu/ trusty/universe amd64 Packages
    wine1.7:
      Installed: (none)
      Candidate: 1:1.7.55-0ubuntu1
      Version table:
         1:1.7.55-0ubuntu1 0
            500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ trusty/main amd64 Packages
    
  • Update 4

    Per @Sneetsher request.

    apt-cache policy acl adduser apt apt-utils aspell aspell-en at-spi2-core base-passwd binfmt-support busybox-initramfs ca-certificates cabextract colord coreutils cpio cpp cpp-4.8 cups-bsd cups-client cups-common dbus dconf-gsettings-backend dconf-service debconf debconf-i18n debianutils dh-python dictionaries-common dpkg e2fslibs e2fsprogs enchant file findutils fontconfig fontconfig-config fonts-dejavu-core fonts-droid fonts-horai-umefont fonts-liberation fonts-unfonts-core fonts-wqy-microhei gcc-4.8-base gcc-4.9-base ghostscript glib-networking glib-networking-common glib-networking-services gnome-exe-thumbnailer gnupg gpgv gsettings-desktop-schemas gsfonts gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x hicolor-icon-theme hunspell-en-us icoutils ifupdown imagemagick imagemagick-common init-system-helpers initramfs-tools initramfs-tools-bin initscripts insserv iproute2 isc-dhcp-client isc-dhcp-common iso-codes klibc-utils kmod krb5-locales libaa1 libacl1 libapparmor1 libapt-inst1.5 libapt-pkg4.12 libarchive-extract-perl libasn1-8-heimdal libasound2 libasound2-data libasound2-plugins libaspell15 libasyncns0 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libattr1 libaudit-common libaudit1 libauthen-sasl-perl libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libblkid1 libbsd0 libbz2-1.0 libc6 libcaca0 libcairo-gobject2 libcairo2 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra0 libcap2 libcapi20-3 libcdparanoia0 libcgmanager0 libcloog-isl4 libcolord1 libcolorhug1 libcomerr2 libcroco3 libcups2 libcupsfilters1 libcupsimage2 libdatrie1 libdb5.3 libdbus-1-3 libdbus-glib-1-2 libdconf1 libdebconfclient0 libdjvulibre-text libdjvulibre21 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdv4 libelf1 libenchant1c2a libencode-locale-perl libexif12 libexpat1 libffi6 libfftw3-double3 libfile-basedir-perl libfile-copy-recursive-perl libfile-desktopentry-perl libfile-listing-perl libfile-mimeinfo-perl libflac8 libfont-afm-perl libfontconfig1 libfontenc1 libfreetype6 libgcc1 libgcrypt11 libgd3 libgdbm3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgeoclue0 libgif4 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglib2.0-data libglu1-mesa libgmp10 libgnutls26 libgomp1 libgpg-error0 libgphoto2-6 libgphoto2-l10n libgphoto2-port10 libgpm2 libgraphite2-3 libgs9 libgs9-common libgssapi-krb5-2 libgssapi3-heimdal libgstreamer-plugins-base0.10-0 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer0.10-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libgusb2 libharfbuzz-icu0 libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhunspell-1.3-0 libhx509-5-heimdal libice6 libicu52 libidn11 libiec61883-0 libieee1284-3 libijs-0.35 libilmbase6 libio-html-perl libio-socket-inet6-perl libio-socket-ssl-perl libisl10 libjack-jackd2-0 libjasper1 libjavascriptcoregtk-3.0-0 libjbig0 libjbig2dec0 libjpeg-turbo8 libjpeg8 libjson-c2 libjson0 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.4-2 libldb1 libllvm3.4 liblocale-gettext-perl liblog-message-simple-perl liblqr-1-0 libltdl7 liblwp-mediatypes-perl liblwp-protocol-https-perl liblzma5 libmagic1 libmagickcore5 libmagickcore5-extra libmagickwand5 libmailtools-perl libmodule-pluggable-perl libmount1 libmpc3 libmpdec2 libmpfr4 libmpg123-0 libncurses5 libncursesw5 libnet-http-perl libnet-libidn-perl libnet-smtp-ssl-perl libnet-ssleay-perl libnetpbm10 libnih-dbus1 libnih1 libnotify4 libntdb1 libodbc1 libogg0 libopenal-data libopenal1 libopenexr6 liborc-0.4-0 libosmesa6 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpcap0.8 libpciaccess0 libpcre3 libpipeline1 libpixman-1-0 libplymouth2 libpng12-0 libpod-latex-perl libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libpopt0 libprocps3 libproxy1 libpulse0 libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib libraw1394-11 libreadline6 libroken18-heimdal librsvg2-2 librsvg2-common libsamplerate0 libsane libsane-common libsasl2-2 libsasl2-modules libsasl2-modules-db libsecret-1-0 libsecret-common libselinux1 libsemanage-common libsemanage1 libsepol1 libshout3 libslang2 libsm6 libsmbclient libsndfile1 libsocket6-perl libsoup2.4-1 libspeex1 libspeexdsp1 libsqlite3-0 libss2 libssl1.0.0 libstdc++6 libsystemd-daemon0 libsystemd-login0 libtag1-vanilla libtag1c2a libtalloc2 libtasn1-6 libtdb1 libterm-ui-perl libtevent0 libtext-charwidth-perl libtext-iconv-perl libtext-soundex-perl libtext-wrapi18n-perl libthai-data libthai0 libtheora0 libtiff5 libtimedate-perl libtinfo5 libtxc-dxtn-s2tc0 libudev1 liburi-perl libusb-0.1-4 libusb-1.0-0 libustr-1.0-1 libuuid1 libv4l-0 libv4lconvert0 libvisual-0.4-0 libvisual-0.4-plugins libvorbis0a libvorbisenc2 libvorbisfile3 libvpx1 libwavpack1 libwayland-client0 libwayland-cursor0 libwbclient0 libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libwebp5 libwind0-heimdal libwmf0.2-7 libwrap0 libwww-perl libwww-robotrules-perl libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxfont1 libxft2 libxi6 libxinerama1 libxkbcommon0 libxml2 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt6 libxtables10 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 lsb-base lsb-release makedev mime-support module-init-tools mount mountall multiarch-support netbase netpbm notification-daemon ocl-icd-libopencl1 odbcinst odbcinst1debian2 openssl p11-kit-modules p7zip passwd patch perl perl-base perl-modules plymouth plymouth-theme-ubuntu-text policykit-1 poppler-data procps psmisc python python-apt python-apt-common python-chardet python-crypto python-debian python-ldb python-minimal python-ntdb python-samba python-six python-talloc python-tdb python2.7 python2.7-minimal python3 python3-apt python3-minimal python3.4 python3.4-minimal readline-common samba-common samba-common-bin samba-libs sed sensible-utils sgml-base shared-mime-info smbclient sound-theme-freedesktop sudo systemd-services systemd-shim sysv-rc sysvinit-utils tar tcpd ttf-mscorefonts-installer ttf-wqy-microhei tzdata ubuntu-keyring ucf udev unixodbc unzip update-inetd update-notifier-common upstart util-linux uuid-runtime wget wine-gecko2.34 wine-mono4.5.4 wine1.7 wine1.7-amd64 wine1.7-i386 winetricks x11-common x11-utils x11-xserver-utils xdg-utils xfonts-encodings xfonts-utils xkb-data xml-core xz-utils zenity zenity-common zip zlib1g
    

    Full output was uploaded here.

  • Update 5

    After I could install wine as suggested by Sneetsher. I still can't run .exe files using wine. Screenshot belowis for:

    wine ~/.wine/drive_c/windows/notepad.exe is top window. And both windows in the bottom are for OLLYDBG.EXE by clicking on it.

    I can't make any edit through notepad.

    enter image description here

    $ wine --version
    wine-1.6.2
    $ which wine
    /usr/local/bin/wine
    

Please, let me know If I have to provide more information.


This will be kind of resume to the trials in the comments above and the related chat room where it was resolved.

What we tried without success:

  • Enable i386 architecture sudo dpkg --add-architecture i386, as Wine needs many dependencies from the 32bit repositories.
  • OP created new sources.list with all components enabled.
  • Disabled all PPA's (Check with grep -r "^deb" /etc/apt/sources.list.d/)
  • aptitude which gives many solutions but all were trying to remove most of the installed desktop packages (>200 packages) or keep it as it is without installing Wine.
  • Installing 1.6 instead 1.7 sudo apt-get install wine=1:1.6.2-0ubuntu4, same unresolved dependencies message.
  • Tracking the conflict down using apt-get install, then got branches.

    The following packages have unmet dependencies:
    libglu1-mesa:i386 : Depends: libgl1-mesa-glx:i386 or
    libgl1:i386
    E: Unable to correct problems, you have held broken packages.
    

    It is not practical to search for conflict this way, waste of efforts and time consuming.

So what we are looking for could be a far (not direct) dependency package:

  • Not available in official repositories + Wine PPA.
  • Or installed but has a version not from official repositories + Wine PPA.

    (ie. installed version is higher than those available from repositories. apt-get & aptitude do not provide solutions with downgrading some packages)

Here are resumed steps:

  1. Add back Wine PPA
  2. I installed debfoster on my machine with same release of OP's system (14.04). Generate list of all recursive dependencies of wine:

    debfoster -d wine
    

    (Why is this? OP can't run this on his machine because debfoster like apt-cache works only for installed packages)

  3. Asked the OP to provide the output of apt-cache policy ... for the list generated in the previous step. (Update 4, in the question)

  4. Then stored previous output and filtered it for easy review:

    grep -e "^[a-zA-Z]" -e "^[ ]*\*\*\*" -e "^[ ]*[1-9]00" -e "^[* ]*[0-9][0-9a-zA-Z:+_~.-]* 0" wine_policy_output.txt
    
  5. Found these packages:

    libdrm-intel1:
     *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
            100 /var/lib/dpkg/status
         2.4.60-2~ubuntu14.04.1 0
            500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages
         2.4.56-1~ubuntu2 0
            500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
         2.4.52-1 0
            500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
    libdrm-nouveau2:
     *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
            100 /var/lib/dpkg/status
         2.4.60-2~ubuntu14.04.1 0
            500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages
         2.4.56-1~ubuntu2 0
            500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
         2.4.52-1 0
            500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
    libdrm-radeon1:
     *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
            100 /var/lib/dpkg/status
         2.4.60-2~ubuntu14.04.1 0
            500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages
         2.4.56-1~ubuntu2 0
            500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
         2.4.52-1 0
            500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
    libdrm2:
     *** 2.4.65+git20151026.c745e541-0ubuntu0ricotz~trusty 0
            100 /var/lib/dpkg/status
         2.4.60-2~ubuntu14.04.1 0
            500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages
         2.4.56-1~ubuntu2 0
            500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
         2.4.52-1 0
            500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
    
    libwayland-client0:
     *** 1.7.0-0ubuntu1~trusty1 0
            100 /var/lib/dpkg/status
         1.4.0-1ubuntu1 0
            500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
    libwayland-cursor0:
     *** 1.7.0-0ubuntu1~trusty1 0
            100 /var/lib/dpkg/status
         1.4.0-1ubuntu1 0
            500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
    

    These seem from “xorg-edgers fresh X crack”. Downgrade them to the version available in repository:

    sudo apt-get install \
      libdrm2=2.4.60-2~ubuntu14.04.1 \
      libdrm-intel1=2.4.60-2~ubuntu14.04.1 \
      libdrm-nouveau2=2.4.60-2~ubuntu14.04.1 \
      libdrm-radeon1=2.4.60-2~ubuntu14.04.1 \
      libwayland-client0=1.4.0-1ubuntu1 \
      libwayland-cursor0=1.4.0-1ubuntu1
    
  6. Still couldn't install wine, we looked for any other suspected package:

    libcgmanager0:
     *** 0.39-2ubuntu2~ubuntu14.04.1 0
            100 http://mirrors.163.com/ubuntu/ trusty-backports/main amd64 Packages
            100 /var/lib/dpkg/status
         0.24-0ubuntu7.5 0
            500 http://mirrors.163.com/ubuntu/ trusty-updates/main amd64 Packages
         0.24-0ubuntu7.1 0
            500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
         0.24-0ubuntu5 0
            500 http://mirrors.163.com/ubuntu/ trusty/main amd64 Packages
    

    This one: 1st point, it is from backports. 2nd point, the current version 0.39 is too far from 0.24 in the stable repo. Downgrade it:

    sudo apt-get install libcgmanager0=0.24-0ubuntu7.5
    
  7. Now, wine installation passed well

    sudo aptitude install wine
    

About the rendering issue, the windows are grayed. As it seems from wine --version 1.6 but we have installed 1.7 & which wine brought that system have a local version of wine installed from source.

Try echo $PATH, you have some thing like:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

See..the variable PATH, it is where the system looks for executable. So writing just wine in shell, it will look in /usr/local/sbin folder, if not found then /usr/local/bin then /usr/sbin then /usr/bin...

Quick fix, removing that local copy of wine:

sudo rm /usr/local/bin/wine*

If you want to keep it, you may run wine with full path:

/usr/bin/wine ...

Update:

I could reproduce same problem on a fresh Ubuntu 14.04 installation. I confirm that the only troubling package is libcgmanager0 version 0.39-2ubuntu2~ubuntu14.04.1 which I don't know how it got installed in the first place.

The packages from “xorg-edgers fresh X crack” PPA are clean and I had suggested downgrading them as a procedure to isolate the problem.

References:

  • How can I get recursively list an apt package's dependencies with their installed versions?