I'm sure this has showed up here before, but I've searched for and tried many things, never being able to solve it.
I was trying to install wine to run windows applications, but when I tried in the command line I always got the message "Unable to correct problems, you have held broken packages.". I ran commands such as sudo apt upgrade
and full-upgrade as well as update, sudo apt-get install -f
, I tried using sudo dpkg
, I tried purging the file that I think is defective (wine-stable), I went to Synaptic package manager, where I found the 4 files that were broken, but when trying to repair them Synaptic failed saying there were broken packages that needed to be fixed before that, so I was stuck in a loop.
The last thing that happened before writing this is the command line returning "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." whenever I tried to upgrade, purge, remove or autoremove the defective files, saying that the files weren't installed, didn't exist and such. But if I tried to install wine again using sudo apt-get install winehq-stable
it still showed me the same message, that there are broken packages.
I ran out of ideas, any help would be appreciated.
edit: okay I'll paste some outputs here, sorry for not formatting correctly, it's my first time here.
guilherme@guilherme-dell:~$ sudo apt-get install winehq-stable
[sudo] password for guilherme:
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 (= 5.0.0~bionic)
E: Unable to correct problems, you have held broken packages.
guilherme@guilherme-dell:~$ sudo apt 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.
guilherme@guilherme-dell:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
guilherme@guilherme-dell:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
guilherme@guilherme-dell:~$ sudo apt-get install wine-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:
wine-stable : Depends: wine-stable-i386 (= 5.0.0~bionic)
Depends: wine-stable-amd64 (= 5.0.0~bionic) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt update
(because your sources changed). Then install Wine from the Ubuntu repositories (sudo apt install wine
). Do not skip steps. Do not run steps out of order. Do not ignore error messages. – user535733 Mar 28 '20 at 03:05