I need some guidance with an issue I am facing on my Zorin 16 OS. I have been trying to install Wine on my system, but I keep encountering an error that prevents me from doing so.
Whenever I attempt to install Wine using the command "sudo apt install zorin-windows-app-support," I receive the following error message:
"The following packages have unmet dependencies:
zorin-windows-app-support : Depends: winehq-stable but it is not going to be installed or
wine
Depends: playonlinux but it is not going to be installed
Recommends: wine-stable-amd64 but it is not going to be installed or
wine64
Recommends: wine-stable-i386:i386 or
wine32:i386."
I have tried to resolve this issue by purging Wine and attempting to reinstall it, but I have not had any success. I would appreciate it if you could provide me with some guidance on how to resolve this issue and successfully install Wine on my system.
sudo apt show zorin-windows-app-support
Package: zorin-windows-app-support
Version: 1.6.5
Priority: optional
Section: admin
Maintainer: Artyom Zorin <azorin@zoringroup.com>
Installed-Size: 8,192 B
Depends: winehq-stable | wine, playonlinux, python2, zorin-windows-app-support-desktop-files
Recommends: wine-stable-amd64 | wine64, wine-stable-i386:i386 | wine32:i386
Download-Size: 2,588 B
APT-Sources: http://ppa.launchpad.net/zorinos/stable/ubuntu focal/main amd64 Packages
Description: Windows App Support in Zorin OS
This is a metapackage which installs packages that facilitate running
Windows apps inside Zorin OS.
sudo apt show playonlinux -a
Package: playonlinux
Version: 4.3.4-1ubuntu1+zorin1
Priority: optional
Section: otherosfs
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Installed-Size: 2,975 kB
Depends: python2:any, binutils, bzip2, cabextract, curl, gettext-base, gnupg, icoutils, imagemagick, jq, mesa-utils, netcat, p7zip-full, python-wxgtk3.0, unzip, wget, wine32 | wine, x11-utils, xterm | x-terminal-emulator
Suggests: scrot, ttf-mscorefonts-installer, winbind
Download-Size: 942 kB
APT-Sources: http://ppa.launchpad.net/zorinos/apps/ubuntu focal/main amd64 Packages
Description: front-end for Wine
PlayOnLinux is a front-end for wine. It permits you to easily install Windows
Games and software on Linux. It is advised to have a functional internet
connection.
sudo apt show winehq-stable
Package: winehq-stable
State: not a real package (virtual)
N: Can't select candidate version from package winehq-stable as it has no candidate
N: Can't select versions from package 'winehq-stable' as it is purely virtual
N: No packages found
function check_packages_and_install_if_absent()
{
for PACKAGENAME
do
if
dpkg -l "$PACKAGENAME" | grep ^ii
then
echo "Package $PACKAGENAME is present"
continue
fi
FOUND=""
while read ACTUALPACKAGENAME
do
echo "$PACKAGENAME is a virtual package, that can be provided by $ACTUALPACKAGENAME"
if
dpkg -l "$ACTUALPACKAGENAME" | grep ^ii
then
echo "Actual package $ACTUALPACKAGENAME is present"
FOUND=true
break;
fi
done < <( apt-cache showpkg "${PACKAGENAME}" | sed -e '1,/^Reverse Provides: *$/ d' -e 's/ .*$//' | sort | uniq )
# Using sed to print lines after match
# https://stackoverflow.com/questions/32569032/sed-print-all-lines-after-match#answer-32569573
if [[ "$FOUND" == "true" ]]
then
continue
fi
echo "Package $PACKAGENAME is absent, installing"
sudo apt-get install -y "$PACKAGENAME"
done
}
Call it like this:
function check_packages_and_install_if_absent foo bar baz
check_packages_and_install_if_absent winehq-stablecheck_packages_and_install_if_absent foo bar baz
dpkg-query: no packages found matching winehq-stablecheck_packages_and_install_if_absent
Package winehq-stablecheck_packages_and_install_if_absent is absent, installing
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package winehq-stablecheck_packages_and_install_if_absent
dpkg-query: no packages found matching foo
Package foo is absent, installing
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package foo
dpkg-query: no packages found matching bar
Package bar is absent, installing
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
bar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.4 kB of archives.
After this operation, 111 kB of additional disk space will be used.
Get:1 Index of /ubuntu focal/universe amd64 bar amd64 1.11.1-3 [41.4 kB]
Fetched 41.4 kB in 0s (118 kB/s)
Selecting previously unselected package bar.
(Reading database ... 283443 files and directories currently installed.)
Preparing to unpack .../bar_1.11.1-3_amd64.deb ...
Unpacking bar (1.11.1-3) ...
Setting up bar (1.11.1-3) ...
Processing triggers for man-db (2.9.1-1) ...
dpkg-query: no packages found matching baz
Package baz is absent, installing
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package baz
Tried running: check_packages_and_install_if_absent winehq-stable
dpkg-query: no packages found matching winehq-stable
Package winehq-stable is absent, installing
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 (= 8.0.0.0~kinetic-1)
E: Unable to correct problems, you have held broken packages.
In my prior post, it shows the 'Depends' and 'Recommends' packages for the specified package. Install those 'Depends' and 'Recommends' packages first, then see if you can get the rest of it installed.
If the all-in-one command doesn't work, try doing it with a single package for each: sudo apt install winbind sudo apt install ttf-mscorefonts-installer sudo apt install scrot
... etc., .etc., .etc....
The following packages have unmet dependencies:
zorin-windows-app-support : Depends: winehq-stable but it is not going to be installed or
wine
Depends: playonlinux but it is not going to be installed
Recommends: wine-stable-amd64 but it is not going to be installed or
wine64
Recommends: wine-stable-i386:i386 or
wine32:i386
E: Unable to correct problems, you have held broken packages.
These repos are still present and must be removed. APT is trying to draw from multiple sources.
Please open Software & Updates and move to the other tab.
Scroll down the list and ensure that all non focal repositories are fully removed.