Wine Installation

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

I believe that's the problem.

A possible solution:

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

So I ran it:

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

1 Like

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.

So something like:
sudo apt install wine playonlinux python2 zorin-windows-app-support-desktop-files wine-stable-amd64 wine-stable-i386 binutils bzip2 cabextract curl gettext-base gnupg icoutils imagemagick jq mesa-utils netcat p7zip-full python-wxgtk3.0 unzip wget x11-utils xterm scrot ttf-mscorefonts-installer winbind

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....

Still same error

You appear to be using the Kinetic Kudo repository instead of the Focal Fossa Repository.

Remove the Kinetic Kudo repo and ensure that the focal fossa repo is present.

I ran:
sudo apt remove ros-kinetic-*
sudo rm -rf /opt/ros/kinetic

and then:
sudo nano /etc/apt/sources.list

I could not see any http://packages.ros.org/ros/ubuntu

These are the wine packages available:
deb Index of /wine-builds/ubuntu focal main

deb-src Index of /wine-builds/ubuntu focal main

deb Index of /wine-builds/debian bullseye main

deb-src Index of /wine-builds/debian bullseye main

deb-src Index of /wine-builds/ubuntu focal main

deb Index of /wine-builds/ubuntu focal-devel main

deb-src Index of /wine-builds/ubuntu focal-devel main

This should also be removed. You still have multiple sources.

Gyek oops. Thanks for fixing that.

Removed. Still same error.

Please run:

sudo apt clean && sudo apt autoremove

sudo dpkg --configure -a

Launch Software & Updates. In the first tab, ensure that the first four boxes are checked.
Under "Download From", set this to Main Server.

sudo apt --fix-missing && sudo apt update

Reboot.

Once loaded into the desktop run

sudo apt install zorin-windows-app-support

and if any errors, copy and paste them here.

1 Like

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.

Had you added 32bit architecture support when you added the wine repository?

sudo dpkg --add-architecture i386 && sudo apt update

You might also see this post:

1 Like

I have.

sudo dpkg --add-architecture i386 && sudo apt update
Hit:1 Index of /ubuntu focal InRelease
Hit:2 Index of /wine-builds/ubuntu focal InRelease
Hit:3 Index of /wine-builds/ubuntu jammy InRelease
Hit:4 Index of /wine-builds/ubuntu kinetic InRelease
Hit:5 Index of /ubuntu focal-updates InRelease
Hit:6 Index of /ubuntu focal-security InRelease
Hit:7 Index of /ubuntu focal-backports InRelease
Hit:8 Index of /zorinos/apps/ubuntu focal InRelease
Hit:9 http://dist.jriver.com/latest/mediacenter buster InRelease
Hit:10 Index of /stable/ focal InRelease
Hit:11 Index of /patches/ focal InRelease
Hit:12 Index of /apps/ focal InRelease
Hit:13 Index of /drivers/ focal InRelease
Hit:14 https://packages.zorinos.com/premium focal InRelease
Hit:15 Index of /zorinos/drivers/ubuntu focal InRelease
Hit:16 Index of /zorinos/patches/ubuntu focal InRelease
Hit:17 Index of /zorinos/stable/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

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.

1 Like

I have checked Software & Updates and the only wine repos present are focal.

You may need to elevate to root

sudo -i

Launch file manager

nautilus

Navigate "Other locations > Computer" Then /etc/apt/sources.list.d and remvoe them from there.

That was the issue. Thank you for helping me navigate this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.