How to install winehq

I have been trying to install and run winehq. I cannot get help on their end.
Here is what I did today:

ralf@ralf-mac-pureos:~$ sudo apt update
[sudo] password for ralf:
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://dl.winehq.org/wine-builds/debian buster InRelease
Get:3 http://deb.debian.org/debian buster-backports InRelease [46.7 kB]
Hit:4 https://repo.pureos.net/pureos amber InRelease
Get:5 https://repo.pureos.net/pureos amber-security InRelease [5,518 B]
Get:6 https://repo.pureos.net/pureos amber-updates InRelease [5,516 B]
Fetched 57.7 kB in 5s (12.7 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
22 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
N: Skipping acquire of configured file ‘main/binary-i386/Packages’ as repository ‘https://repo.pureos.net/pureos amber InRelease’ doesn’t support architecture ‘i386’
N: Skipping acquire of configured file ‘main/binary-i386/Packages’ as repository ‘https://repo.pureos.net/pureos amber-security InRelease’ doesn’t support architecture ‘i386’
N: Skipping acquire of configured file ‘main/binary-i386/Packages’ as repository ‘https://repo.pureos.net/pureos amber-updates InRelease’ doesn’t support architecture ‘i386’
ralf@ralf-mac-pureos:~$ sudo dpkg --add-architecture 1386
ralf@ralf-mac-pureos:~$ sudo apt-key add winehq.key
OK
ralf@ralf-mac-pureos:~$ wine32
wine32: command not found
ralf@ralf-mac-pureos:~$ wine
it looks like wine32 is missing, you should install it.
as root, please execute “apt-get install wine32”
Usage: wine PROGRAM [ARGUMENTS…] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit
ralf@ralf-mac-pureos:~$ sudo apt-get install wine32
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package wine32 is a virtual package provided by:
winehq-staging 5.9~buster
winehq-stable 5.0.0~buster
winehq-devel 5.9~buster
You should explicitly select one to install.

E: Package ‘wine32’ has no installation candidate
ralf@ralf-mac-pureos:~$ sudo apt-get install 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 (= 5.0.0~buster)
E: Unable to correct problems, you have held broken packages.

ralf@ralf-mac-pureos:~$ lsb_release -cs
amber
ralf@ralf-mac-pureos:~$ sudo nano /etc/apt/sources.list
[sudo] password for ralf:
ralf@ralf-mac-pureos:~$
ralf@ralf-mac-pureos:~$
ralf@ralf-mac-pureos:~$ 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 (= 5.0.0~buster)
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Packages (main/binary-1386/Packages) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Contents-deb (main/Contents-amd64) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Contents-deb (main/Contents-i386) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Contents-deb (main/Contents-1386) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
W: Target Contents-deb (main/Contents-all) is configured multiple times in /etc/apt/sources.list:7 and /etc/apt/sources.list:8
E: Unable to correct problems, you have held broken packages.
ralf@ralf-mac-pureos:~$

PureOS does not directly support 32 bit. You can get it to work, but it is complicated. It is easier to use a different distro (Ubuntu, for example).

2 Likes

Wine 32-bit is a hassle on PureOS. I got it to work eventually by using a chroot with vanilla debian 32-bit in it as described here: PureOS + Buster 32bit HOWTO. The advantage is that the main system is untouched so you don’t end up with a frankendebian.

1 Like

Why recommend Ubuntu before Debian? Debian is closer to PureOS.

1 Like

My personal preference. I prefer stuff working before unrealistic expectations regarding free drivers and the like.

There is nothing wrong with Debian.

Same like PureOS, under Debian Buster Package ‘wine32’ has no installation candidate, what is wrong with installing ‘wine64’ (if it serves the purpose).

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install wine64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  fonts-wine libcapi20-3 libodbc1 libosmesa6 libsdl2-2.0-0 libvkd3d1 libwine ocl-icd-libopencl1 wine
Suggested packages:
  libmyodbc odbc-postgresql tdsodbc unixodbc-bin cups-bsd ttf-mscorefonts-installer opencl-icd q4wine winbind
  winetricks playonlinux wine-binfmt dosbox exe-thumbnailer | kio-extras wine64-preloader
Recommended packages:
  wine32
The following NEW packages will be installed:
  fonts-wine libcapi20-3 libodbc1 libosmesa6 libsdl2-2.0-0 libvkd3d1 libwine ocl-icd-libopencl1 wine wine64
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.3 MB of archives.
After this operation, 239 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Wine64 on PureOS confirming link is here.

Above is incorrect.

$ sudo dpkg --add-architecture i386 - this is correct as described here, yet on amd64 architecture you should not proceed with it. If success expected, dpkg --remove-architecture command should have no output (first time):

$ sudo dpkg --add-architecture i386
$ sudo dpkg --remove-architecture i386
$ sudo dpkg --remove-architecture i386 (second time)
dpkg: warning: cannot remove non-foreign architecture 'i386'

@Ralf, please do the following as well:
$ sudo apt --fix-broken install
$ sudo apt autoremove

Yes, there might exist at least two (hard) ways to install wine32 on PureOS through Debian repositories, but this is not something that I recommend (without that you are insisting on it) if wine64 works fine for you. And, please be aware that Debian (PureOS) and Ubuntu sometimes use similar but still different names for the same things (packages).

Now, as second option, please let us know if this is eventual solution, the one you are actually looking for:

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ buster main'

Will someone (besides Ralf) test this and confirm it as, might be, safe direction here?

Main link: https://dl.winehq.org/wine-builds/

My proposal (draft):

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ buster main'
$ sudo dpkg --add-architecture i386 
$ wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
$ sudo apt update
$ sudo apt install --install-recommends winehq-stable
1 Like

Sorry that I missed that one! Good job!

Correct :+1:️! Not 100% sure but I believe that @Ralf is having within SourcesList just:

deb http://deb.debian.org/debian buster non-free or something similar (without main and contrib) in his repository address (as I recommended earlier).

I still cannot figure out how to download this stuff. I am so used to Windows or Apple were you hit a download button and the app winds up in my download folder. Here in Linux that button does not exist.

As you know, PureOS is not distribution that supports WineHQ out-of-the-box:

Please follow my draft recommendation, copy/paste from above, if you want to use WineHQ with modifying PureOS (by adding packages and repositories that are not supported with this Linux distribution). As well, here is WineHQ link that you started to follow but made key mistake with: --add-architecture 1386.

Another fine-to-coarse approach, that might work (as I don’t use it) quite well, would be to install winepak (https://www.winepak.org/), but first you’d need to install flatpak (https://flatpak.org/setup/Debian/). Please reply here which solution (WineHQ or FLATPAK based) was adequate installation method for your needs.

Default wine64 version available in PureOS repos is way out of date btw, version 5.0.3. will try installing a current version using your tips.

2 Likes

As above post/proposal describes, please consider adding either:
$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main'
or
$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ bookworm main'

1 Like

Tried adding both repos (one at a time) but each throws a no pubkey error when running apt update, like so:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
1 Like
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

sudo apt update
sudo apt install wine-stable-amd64

Note: please avoid installing wine-stable-i386_3.0.4~sid_i386.deb or rather do not even bother with the i386 package as above should actually take care of getting/making this installation successful (just not 100% sure as I’m not having installed here related package).

3 Likes

Got a broken pipe error with the command provided. This one did work for me however

# wget -O - https://dl.winehq.org/wine-builds/winehq.key | apt-key add
2 Likes

I have successfully installed wine64 v9.0 using the repositories provided by Quarnero. The package doesn’t put the binary executable in any of the default paths however. I had to do that manually via the following command.

cd /usr/bin; sudo ln -s /opt/wine-stable/bin/wine64 .

Same thing for winecfg command (which is actually wineapploader)

2 Likes