fail to install winehq on ubuntu 22.04

Questions about Wine on Linux
Post Reply
joesphLLL
Newbie
Newbie
Posts: 2
Joined: Sat Feb 24, 2024 9:01 pm

fail to install winehq on ubuntu 22.04

Post by joesphLLL »

I tried several times following the instructions. but no one was successful.
Here is the history of my terminal:

Code: Select all

 gaoming@gaoming-ROG:/etc/apt/sources.list.d$ sudo dpkg --add-architecture i386 
[sudo] password for gaoming:

Code: Select all

gaoming@gaoming-ROG:/etc/apt/sources.list.d$ sudo mkdir -pm755 /etc/apt/keyrings

Code: Select all

gaoming@gaoming-ROG:/etc/apt/sources.list.d$ sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
--2024-02-24 20:15:19-- https://dl.winehq.org/wine-builds/winehq.key
Resolving dl.winehq.org (dl.winehq.org)... 146.75.106.217
Connecting to dl.winehq.org (dl.winehq.org)|146.75.106.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3220 (3.1K) [application/pgp-keys]
Saving to: ‘/etc/apt/keyrings/winehq-archive.key’

/etc/apt/keyrings/w 100%[===================>] 3.14K --.-KB/s in 0.001s

2024-02-24 20:15:20 (2.07 MB/s) - ‘/etc/apt/keyrings/winehq-archive.key’ saved [3220/3220]

Code: Select all

gaoming@gaoming-ROG:/etc/apt/sources.list.d$ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
--2024-02-24 20:15:24-- https://dl.winehq.org/wine-builds/ubunt ... my.sources
Resolving dl.winehq.org (dl.winehq.org)... 146.75.106.217
Connecting to dl.winehq.org (dl.winehq.org)|146.75.106.217|:443... connected.
HTTP request sent, awaiting response... 304 Not Modified
File ‘/etc/apt/sources.list.d/winehq-jammy.sources’ not modified on server. Omitting download.

Code: Select all

gaoming@gaoming-ROG:/etc/apt/sources.list.d$ sudo apt install --install-recommends winehq-stable
Reading package lists... Done
Building dependency tree... Done
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 (= 9.0.0.0~mantic-1)
E: Unable to correct problems, you have held broken packages.


Is there any way to delete broken packages? I tried to do it in the files software, but no permission.
Screenshot from 2024-02-24 20-24-34.png
Screenshot from 2024-02-24 20-22-37.png
Timur
Newbie
Newbie
Posts: 4
Joined: Wed Nov 15, 2023 3:56 am

Re: fail to install winehq on ubuntu 22.04

Post by Timur »

What is in the file?

Code: Select all

sudo nano /etc/apt/sources.list.d/winehq-matic.sources 
( if you only use GUI:

Code: Select all

sudo gedit /etc/apt/sources.list.d/winehq-matic.sources
)
You may remove it:

Code: Select all

sudo rm /etc/apt/sources.list.d/winehq-matic.sources 
There should be /etc/apt/sources.list.d/winehq-jammy.sources , you may create it yourself pasting this, which looks like:
Types: deb
URIs: https://dl.winehq.org/wine-builds/ubuntu
Suites: jammy
Components: main
Architectures: amd64 i386
Signed-By: /etc/apt/keyrings/winehq-archive.key
Name is not important, but "mantis" in the name indicates it may not be "jammy" inside.

Also, you may see viewtopic.php?t=38648. Updated libxml2 is incompatible with wine 9, so far you may check with older version.
Last edited by Timur on Tue Feb 27, 2024 3:29 am, edited 1 time in total.
Post Reply