2

I followed the WineHQ Wiki in order to install WINE, So I typed all the following lines:

sudo dpkg --add-architecture i386 
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main' 
sudo apt update

and then when typing:

sudo apt install --install-recommends winehq-stable

image packages

In order to get the packages of the Stable branch. I had the following output:

sudo apt install --install-recommends winehq-stable
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~trusty)
E: Unable to correct problems, you have held broken packages.

What does it mean please?

edit: I already tried to run

sudo apt-get update

but it doesn't work.

EDIT: Added Software sources:
Software sources

  • Please I don't think we have the same error message, and this post is outdated since more than 6 years now – Ced Mar 18 '19 at 11:28
  • could you edit your post to include the commands you typed before that, E.G. what source did you add? also why are you resorting to wine specifially and not a super-layer such as proton, lutris, ect? what is the windows app you want to run? likely it is easier to set it up with lutris/proton – tatsu Mar 18 '19 at 11:37
  • 1
    Of course, thank you for your feedback. I added all the commands I typed before that, about the source it is sudo apt install --install-recommends winehq-stable of the WineHQ Wiki. The windows app I want to run is the following playonlinux.com/en/app-2665-Microsoft_Office_2013.html So I planned to install Wine, then PlayOnLinux and than Microsoft Office 2013. – Ced Mar 18 '19 at 11:45
  • actually this : sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main' is the source. cosmic is for 18.10 not for 18.04 as you can see : wiki.ubuntu.com/Releases – tatsu Mar 18 '19 at 11:47
2

it seems to me your issue is you are attempting to use Cosmic sources with Bionic : https://wiki.ubuntu.com/Releases

run :

sudo apt-add-repository --remove 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
sudo apt update
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt update
sudo apt install --install-recommends winehq-stable

also as a long-time user of wine who has experience using it, the best possible wine experience comes from letting other programs configure & use it for you, E.G. Steam and Lutris. While both are meant to be used for running specifically gaming apps, I've used them successfully with non-gaming apps. You should probably take a look.

  • 1
    Good catch! That is indeed a very frequent cause of this kind of "impossible situation" – user535733 Mar 18 '19 at 11:56
  • 3
    Curious, I still have the same error: E: Unable to correct problems, you have held broken packages. – Ced Mar 18 '19 at 15:52
  • hmm, try sudo dpkg --configure -a then sudo apt install -f – tatsu Mar 19 '19 at 7:04
  • 1
    right-click on the "trusty" source and select delete, type your password, then tick "Canonical Partners", close Software & Sources, wait for source reload, open up a terminal, run sudo dpkg --configure -a && sudo apt install -f && sudo apt update && sudo apt autoremove -y && sudo apt autoclean && sudo apt full-upgrade -y && sudo apt install && wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key && sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' -y && sudo apt update && sudo apt install --install-recommends winehq-stable -y – tatsu Mar 20 '19 at 13:57
  • 1
    it'll be a bit less straightforward you'd have to use a wineprefix meant for a game and change it's configuration so that it points to the office executable you want once it's installed. basically it's the same thing as wine. I dunno why that haven't created a runner for MSoffice, but it's not that relevant. the interesting part of lutris is that it offers proton, which is a basically a better version of wine. – tatsu Mar 22 '19 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.