Cannot install wine on ubuntu 19.10/20.04
As you are using modern Ubuntu 20.04 LTS - I would recommend to remove WineHQ repository and install Wine 5.0.3 from universe:
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ disco main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main'
sudo add-apt-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get dist-upgrade # to get newest dependencies
Below I summarize steps done in the comments:
# remove obsolete PPA
sudo add-apt-repository -r ppa:gnome3-team/gnome3
# check real reason of the problem
sudo apt-get install aptitude
sudo aptitude install wine32:i386
By last command we have determined that there are several locally (previously from some repository) installed packages. We need to replace them with versions from the official repositories:
sudo aptitude install libfaudio0=20.04-2 libodbc1=2.3.6-0.1build1 libpcre3=2:8.39-12build1
And finally install Wine:
sudo apt-get install wine wine32
Related videos on Youtube
Alexey Anufriev
Updated on September 18, 2022Comments
-
Alexey Anufriev over 1 year
I have tried to follow the official guide but unfortunately, there is something wrong with dependencies.
$ sudo apt install winehq-stable The following packages have unmet dependencies. winehq-stable : Depends: wine-stable (= 5.0.0~eoan)
$ sudo apt install wine-stable The following packages have unmet dependencies. wine-stable : Depends: wine-stable-i386 (= 5.0.0~eoan)
$ sudo apt install wine-stable-i386 The following packages have unmet dependencies. wine-stable-i386:i386 : Depends: libfaudio0:i386 (>= 19.06.07) but it is not going to be installed Depends: libglib2.0-0:i386 (>= 2.12.0) but it is not going to be installed Depends: libgstreamer-plugins-base1.0-0:i386 (>= 1.0.0) but it is not going to be installed Depends: libgstreamer1.0-0:i386 (>= 1.4.0) but it is not going to be installed Recommends: libcups2:i386 but it is not going to be installed Recommends: libgssapi-krb5-2:i386 but it is not going to be installed Recommends: libkrb5-3:i386 but it is not going to be installed Recommends: libodbc1:i386 but it is not going to be installed Recommends: libsane:i386 but it is not going to be installed or libsane1:i386
... many steps in between, and the last one is quite dangerous to me.
$ sudo apt install libpcre2-8-0:i386 The following NEW packages will be installed libpcre2-8-0:i386 pinentry-curses WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! apt adduser (due to apt) coreutils libselinux1 (due to coreutils) dash dpkg (due to dash) debconf (due to dash) tar (due to dpkg) fdisk libmount1 (due to fdisk) findutils grep install-info (due to grep) gzip init systemd-sysv (due to init) init-system-helpers (due to init) perl-base (due to init-system-helpers) login libpam0g (due to login) libpam-runtime (due to login) libpam-modules (due to login) mount util-linux (due to mount) sed sysvinit-utils 0 to upgrade, 2 to newly install, 1594 to remove and 0 not to upgrade. Need to get 218 kB of archives. After this operation, 9.097 MB disk space will be freed. You are about to do something potentially harmful To continue type in the phrase ‘Yes, do as I say!’
How to resolve this dependency hell?
UPDATE
Some info on configured repos (also viewable here):
$ grep -r ^deb /etc/apt/ --include="*.list" /etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main /etc/apt/sources.list.d/nordvpn.list:deb https://repo.nordvpn.com/deb/nordvpn/debian stable main /etc/apt/sources.list.d/team-xbmc-ubuntu-ppa-eoan.list:deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu eoan main /etc/apt/sources.list.d/thopiekar-ubuntu-cura-eoan.list:deb http://ppa.launchpad.net/thopiekar/cura/ubuntu eoan main /etc/apt/sources.list.d/spotify.list:deb http://repository.spotify.com stable non-free /etc/apt/sources.list.d/papirus-ubuntu-papirus-eoan.list:deb http://ppa.launchpad.net/papirus/papirus/ubuntu eoan main /etc/apt/sources.list.d/slack.list:deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main /etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan main restricted /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-updates main restricted /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan universe /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-updates universe /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan multiverse /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-updates multiverse /etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ eoan-backports main restricted universe multiverse /etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu eoan-security main restricted /etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu eoan-security universe /etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu eoan-security multiverse /etc/apt/sources.list:deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main
$ dpkg --print-foreign-architectures i386
$ apt-cache policy winehq-stable wine-stable winehq-stable: Installed: (none) Candidate: 5.0.0~eoan Version table: 5.0.0~eoan 500 500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages 4.0.3~eoan 500 500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages wine-stable: Installed: (none) Candidate: 5.0.0~eoan Version table: 5.0.0~eoan 500 500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages 4.0.3~eoan 500 500 https://dl.winehq.org/wine-builds/ubuntu eoan/main amd64 Packages 3.0.1ubuntu1 500 500 http://de.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu eoan/universe i386 Packages
(Also viewable here.)
$ dpkg -l | grep -i wine ii | libkwineffects12 | 4:5.16.5-0ubuntu1 | amd64 | KDE window manager effects library ii | wine-stable-amd64 | 5.0.0~eoan | amd64 | WINE Is Not An Emulator - runs MS Windows programs
UPDATE #2:
I have upgraded to 20.40 and to install in two different ways:
$ sudo apt install --install-recommends winehq-stable 4704 21:14:36 kubesail-alexey-anufriev/alexey-anufriev ⎈ 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. winehq-stable : Depends: wine-stable (= 4.0.4~focal) E: Unable to correct problems, you have held broken packages.
And:
sudo apt install wine64 wine32 100 ↵ 4705 21:15:40 kubesail-alexey-anufriev/alexey-anufriev ⎈ 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. wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
Still no luck.
UPDATE 3
$ sudo aptitude install winehq-stable The following NEW packages will be installed: gstreamer1.0-plugins-base:i386{a} libglib2.0-0:i386{a} libgstreamer-plugins-base1.0-0:i386{a} libgstreamer1.0-0:i386{a} libodbc1:i386{ab} libpcre3:i386{ab} wine-stable{a} wine-stable-amd64{a} wine-stable-i386:i386{a} winehq-stable{b} 0 packages upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Need to get 52,3 MB of archives. After unpacking 466 MB will be used. The following packages have unmet dependencies: libodbc1 : Breaks: libodbc1:i386 (!= 2.3.7) but 2.3.6-0.1build1 is to be installed libodbc1:i386 : Breaks: libodbc1 (!= 2.3.6-0.1build1) but 2.3.7 is installed libpcre3 : Breaks: libpcre3:i386 (!= 2:8.43-1+ubuntu18.04.1+deb.sury.org+1) but 2:8.39-12build1 is to be installed libpcre3:i386 : Breaks: libpcre3 (!= 2:8.39-12build1) but 2:8.43-1+ubuntu18.04.1+deb.sury.org+1 is installed winehq-stable : Conflicts: wine but 5.0-3ubuntu1 is installed Conflicts: wine:i386 which is a virtual package, provided by: - winehq-staging:i386 (5.9~focal), but it is not going to be installed - winehq-staging:i386 (5.8~focal), but it is not going to be installed - winehq-staging:i386 (5.7~focal), but it is not going to be installed - winehq-stable:i386 (4.0.4~focal), but it is not going to be installed - winehq-devel:i386 (5.9~focal), but it is not going to be installed - winehq-devel:i386 (5.8~focal), but it is not going to be installed - winehq-devel:i386 (5.7~focal), but it is not going to be installed - wine (5.0-3ubuntu1), but 5.0-3ubuntu1 is installed - wine (5.0-3ubuntu1), but 5.0-3ubuntu1 is installed - wine-development (5.5-3ubuntu1), but it is not going to be installed The following actions will resolve these dependencies: Keep the following packages at their current version: 1) gstreamer1.0-plugins-base:i386 [Not Installed] 2) libglib2.0-0:i386 [Not Installed] 3) libgstreamer-plugins-base1.0-0:i386 [Not Installed] 4) libgstreamer1.0-0:i386 [Not Installed] 5) libodbc1:i386 [Not Installed] 6) libpcre3:i386 [Not Installed] 7) wine-stable [Not Installed] 8) wine-stable-i386:i386 [Not Installed] 9) winehq-stable [Not Installed] Leave the following dependencies unresolved: 10) libgstreamer-plugins-base1.0-0:i386 recommends gstreamer1.0-plugins-base:i386 11) wine-stable-i386:i386 recommends libodbc1:i386 Accept this solution? [Y/n/q/?] Y No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used.
$ apt-cache policy winehq-stable wine-stable wine32 wine64 winehq-stable: Installed: (none) Candidate: 4.0.4~focal Version table: 4.0.4~focal 500 500 https://dl.winehq.org/wine-builds/ubuntu focal/main amd64 Packages wine-stable: Installed: (none) Candidate: 4.0.4~focal Version table: 4.0.4~focal 500 500 https://dl.winehq.org/wine-builds/ubuntu focal/main amd64 Packages 3.0.1ubuntu1 500 500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages 500 http://de.archive.ubuntu.com/ubuntu focal/universe i386 Packages wine32:i386: Installed: (none) Candidate: 5.0-3ubuntu1 Version table: 5.0-3ubuntu1 500 500 http://de.archive.ubuntu.com/ubuntu focal/universe i386 Packages wine64: Installed: 5.0-3ubuntu1 Candidate: 5.0-3ubuntu1 Version table: *** 5.0-3ubuntu1 500 500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages 100 /var/lib/dpkg/status
-
N0rbert about 4 yearsDoes this answer your question? How do I enable the "Universe" repository?
-
Alexey Anufriev about 4 years'universe' distribution component is already enabled for all sources
-
Alexey Anufriev about 4 yearssorry, but how this can help?
-
N0rbert about 4 yearsPlease add output of the following commands to the question body (or upload to pastebin):
grep -r ^deb /etc/apt/ --include="*.list"
,dpkg --print-foreign-architectures
,apt-cache policy winehq-stable wine-stable
,dpkg -l | grep -i wine
. -
Alexey Anufriev about 4 years@N0rbert, done, I have updated the question
-
N0rbert about 4 yearsJust a simple question. Did you forgot to run
sudo apt update
? Please share its complete output to pastebin too. -
Alexey Anufriev about 4 years@N0rbert, run it probably a million times.
-
Alexey Anufriev about 4 years@N0rbert, anything you can suggest I still can dig into?
-
N0rbert about 4 yearsI do not have exact solution. The main concern is that your APT tried to remove essential packages. We can reinstall them by
sudo apt-get install --reinstall apt adduser coreutils libselinux1 dash dpkg debconf tar fdisk libmount1 findutils grep install-info gzip init systemd-sysv init-system-helpers perl-base login libpam0g libpam-runtime libpam-modules mount util-linux sed sysvinit-utils
. And then try to fix Wine. If this a VM and you do not loose many workhours, consider to do full-reinstall of LTS version. Of wait for final release of 20.04 LTS. -
karel almost 4 yearsDoes this answer your question? How do I resolve unmet dependencies after adding a PPA?
-
Alexey Anufriev almost 4 years@N0rbert, upgrade to 20.04 unfortunately did not help. You can see the output in the updated section of the question.
-
Ollie almost 4 yearsDoes this help? askubuntu.com/questions/1240184/…
-
N0rbert almost 4 yearsPlease add output of
apt-cache policy winehq-stable wine-stable wine32 wine64
to the question. -
Alexey Anufriev almost 4 years@Ollie, tried your suggestion but it did not help, I have added aptitude output to the question (see UPDATE 3 section).
-
Alexey Anufriev almost 4 years@N0rbert, added, see UPDATE 3 section
-
Adupa Vasista almost 4 yearsTry this It contains everything askubuntu.com/questions/316025/…
-
Alexey Anufriev almost 4 years@AdupaVasista, already tried this, did not help
-
-
Alexey Anufriev almost 4 yearsThis way I can install win64 but not wine32. The following packages have unmet dependencies: wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed.
-
N0rbert almost 4 yearsI can;t reproduce your problems on clean fully updated VM. Please check the output of
grep -r ^deb /etc/apt/ --include="*.list"
,dpkg --print-foreign-architectures
,apt-cache policy winehq-stable wine-stable wine32 libwine:i386
,dpkg -l | grep -i wine
again - upload it to pastebin. -
Alexey Anufriev almost 4 years
-
N0rbert almost 4 yearsThe GNOME PPA does not have packages for focal. Remove it with
sudo add-apt-repository -r ppa:gnome3-team/gnome3
. Then runsudo apt-get update
and retry Wine32 installation withsudo apt-get install wine32
. If error persists please share the output of fullsudo apt-get update
to pastebin. -
Alexey Anufriev almost 4 yearsdone - pastebin.com/EEeyv6L5
-
N0rbert almost 4 yearsI can't understand why you are still facing the issues. Please switch to main server (
archive.ubuntu.com
), then runsudo apt-get update
withsudo apt-get dist-upgrade
. -
Alexey Anufriev almost 4 yearswhich ones should I change?
-
N0rbert almost 4 yearsChange all
de.archive.ubuntu.com
toarchive.ubuntu.com
using text editor or Software & Updates (software-properties-gtk
) - set Download from to Main server. -
Alexey Anufriev almost 4 yearsdid that, still
wine32:i386 : Depends: libwine:i386 (= 5.0-3ubuntu1) but it is not going to be installed
-
N0rbert almost 4 yearsDo you have all upgrades installed currently? Do you have
aptitude
installed? If not install bothsudo apt-get dist-upgrade
,sudo apt-get install aptitude
,sudo aptitude install wine32:i386
,aptitude why-not wine32:i386
. And share the output of two latter commands. -
Alexey Anufriev almost 4 yearsdone, pastebin.com/KLuDwbXS, I think there is something with
libodbc1:i386
-
N0rbert almost 4 yearsIt seems I found the problem. You have faudio installed. Let's check from which source it, pcre and odbc was obtained by
apt-cache policy libfaudio0 libfaudio0:i386 libodbc1 libodbc1:i386 libpcre3 libpcre3:i386
- add to pastebin. -
Alexey Anufriev almost 4 years
-
N0rbert almost 4 yearsOK, so you have to install some packages from official repositories with
sudo aptitude install libfaudio0=20.04-2 libodbc1=2.3.6-0.1build1 libpcre3=2:8.39-12build1
and then install wine32. -
Alexey Anufriev almost 4 yearsit worked, installation complete, thank you, @N0rbert!