Wine: How to fix held broken packages?
13,413
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.
Related videos on Youtube
Comments
-
Ced over 1 year
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
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.
-
user535733 about 5 yearsGood catch! That is indeed a very frequent cause of this kind of "impossible situation"
-
Ced about 5 yearsCurious, I still have the same error:
E: Unable to correct problems, you have held broken packages.
-
tatsu about 5 yearshmm, try
sudo dpkg --configure -a
thensudo apt install -f
-
tatsu about 5 yearsalso follow that up with
sudo apt autoremove
,sudo apt autoclean
(are you sure wine was the only source you added that was of the wrong distribution? check you software sources all of them should have "bionic", "stable" or "stretch" as the second to last word) if they don't, remove them. -
Ced about 5 yearsThank for your answer, I tried
sudo dpkg --configure -a
thensudo apt install -f
but this does not fix it. Do you know how can I check my software sources ? -
tatsu about 5 yearsopen up start menu, type "So" and you open "Software and Sources". switch to second tab.
-
Ced about 5 yearsThank you, I updated my post in order to give you all details related to the software sources.
-
tatsu about 5 yearsright-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 about 5 yearsyou didn't answer why you preferred to run and configure wine manually rather than have applications that do it for you. seeing how new you seem to sources and such you'd be much better off. I personally think even wine experts (I'm almost one) are better off. just use lutris
-
Ced about 5 yearssorry, I wanted wine because PlayOnLinux need it in order to install Microsoft Office 2013
-
Ced about 5 yearsI succeeded to install wine by uninstalling old sources and using
sudo apt install wine-stable winetricks
-
tatsu about 5 yearswell that's bizzare. Play on linux doesn't need you to install wine, it should be able to install it itself. Play doesn't use the system's wine anyways, it uses it's own that's in it's own files.
-
tatsu about 5 years@Ced could you make me as answer. the old (and too new) sources were indeed what was causing the issue. and people need to know that they can rely on this answer.
-
Ced about 5 yearsPLayOnLinux raises an error if you start running it without having already installed wine. Of course, thanks for your help however WineHQ was not properly working with me so I used
sudo apt install wine-stable winetricks
instead -
tatsu about 5 yearsokay. noted. I didn't recall this behavior. lutris does not care what you have installed it needs only itself and it downloads it's own versions of wine.
-
Ced about 5 years@tatsu Ok I'm taking notes thanks, in conclusion do you recommend me to use Lutris instead of PlayOnLinux in order to install Microsoft Office?
-
tatsu about 5 yearsit'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.
-
Max Svid about 4 years+1 for that. I'm using Lutris to manage my music production workstation
-
David over 2 yearsYour answer does not cover the question asked.
-
Zakaria Abdelaziz over 2 yearswhy don't you answer then