3

I've been following this post : Can't install Wine Ubuntu 18.04

but the solution of installing wine-staging didn't work for me.

Here's the output of my attempt :

sudo apt install wine-staging`
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-staging : Depends: wine-staging-amd64 (= 4.0~rc5~cosmic) but it is not going to be installed
                Depends: wine-staging-i386 (= 4.0~rc5~cosmic)
E: Unable to correct problems, you have held broken packages.

Tried to install wine-staging-amd64 but then, get other dependencies issues :

sudo apt-get install wine-staging-amd64
[sudo] password for gerard: 
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-staging-amd64 : Depends: libavcodec58 (>= 7:4.0) but it is not installable
                      Depends: libavutil56 (>= 7:4.0) but it is not installable
                      Depends: libvkd3d1 but it is not installable
                      Recommends: libcapi20-3 but it is not going to be installed
                      Recommends: libodbc1 but it is not going to be installed
                      Recommends: libosmesa6 but it is not going to be installed
                      Recommends: libsdl2-2.0-0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Edit: I deleted all external sources on the Ubuntu Software GUI in the section "Other software", ran upgrade, reboot and followed Elvir instructions. It worked, thanks !

C. Auth
  • 33
  • The wine-staging package is not in Ubuntu. You are getting it from somewhere else. You have unwisely added a non-Ubuntu source that provides packages that are incompatible with your release of Ubuntu. Determine the source using the apt-cache policy command (see the manpage for apt-cache), uninstall ALL packages from that source, and delete that source. Look up the ppa-purge command for how. – user535733 Jan 13 '19 at 22:16

2 Answers2

1
  1. Run the following command in the Terminal for adding i386 architecture before installing a 64-bit version of Wine:

$ sudo dpkg --add-architecture i386

  1. Run the following in order to add the WineHQ signing key:

$ wget -qO- https://dl.winehq.org/wine-builds/Release.key | sudo apt-key add -

  1. Now run the following command in order to add the relevant repository from the WineHQ:

$ sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ artful main'

This is the most recent and stable release of Wine available. Use the following command to install this version:

sudo apt-get install --install-recommends winehq-stable

Please enter Y when prompted with a choice of y/n for installation. After that, the stable version of Wine will be installed on your system.

Elvir
  • 46
  • The only answer that worked for me. Make sure you sudo apt remove [package_name] all Wine packages before beginning this process, using sudo apt list --installed as a reference. Starting with a clean slate has prevented another hour to days of frustration when dealing with many issues like this in the past. – Steven Ventimiglia Jan 30 '20 at 02:57
0

Try this:

apt update
apt dist-upgrade
apt install wine-staging
Eric Mintz
  • 2,516
  • 12
  • 24