3

I am trying to install wine to Ubuntu 18.04, but I get the error:

The following packages have unmet dependencies:

      wine32:i386 : Depends: libwine:i386 (= 3.0-1ubuntu1) but it is not going to be installed
 wine64 : Depends: libwine (= 3.0-1ubuntu1) but it is not going to be installed

Even when I try to build it, I get a warning that says I need flex and when I try to install flex, I get the exact same error again.

I saw online that a couple people mentioned that I might have messed up the update repositories, with either a wrong Ubuntu version or a third party, and I need to find it and then clean it. However, I am not familiar with this at all, I listed all repositories but I don't know which one I should delete and how I can delete it.

this output is removed due to character length limit

EDIT: As requested, grep -v ^# /etc/apt/sources.list

deb http://tr.archive.ubuntu.com/ubuntu/ bionic main restricted

deb http://tr.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

deb http://tr.archive.ubuntu.com/ubuntu/ bionic universe
deb http://tr.archive.ubuntu.com/ubuntu/ bionic-updates universe

deb http://tr.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://tr.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

deb http://tr.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://archive.canonical.com/ bionic partner
deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main

grep -v ^# /etc/apt/sources.list.d/*.list

/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:

apt-cache policy wine32:i386 wine64 libwine:i386 wine32:i386:

  Installed: 3.0-1ubuntu1
  Candidate: 3.0-1ubuntu1
  Version table:
 *** 3.0-1ubuntu1 500
        500 http://tr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
        100 /var/lib/dpkg/status
wine64:
  Installed: 3.0-1ubuntu1
  Candidate: 3.0-1ubuntu1
  Version table:
 *** 3.0-1ubuntu1 500
        500 http://tr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status
libwine:i386:
  Installed: (none)
  Candidate: 3.0-1ubuntu1
  Version table:
     3.0-1ubuntu1 500
        500 http://tr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages

Firstly, I tried to install iced tea

by:

sudo apt-get install icedtea-plugin

I tried installing Wine by:

sudo apt install wine-stable wine32

build by:

git clone git://source.winehq.org/git/wine.git ~/wine-dirs/wine-source

cd ~/wine-dirs/wine-source/
../wine-source/configure --enable-win64

EDIT 2:

~$ apt-cache policy wine-stable

wine-stable:
  Installed: 3.0-1ubuntu1
  Candidate: 3.0-1ubuntu1
  Version table:
 *** 3.0-1ubuntu1 500
        500 http://tr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        500 http://tr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
        100 /var/lib/dpkg/status

~$ dpkg -l | grep -i wine

ii  q4wine                                        1.3.6-2                                         amd64        Qt GUI for wine (WINE)
iU  wine-stable                                   3.0-1ubuntu1                                    all          Windows API implementation - standard suite
rc  wine1.6                                       1:1.6.2-0ubuntu14.2                             amd64        Microsoft Windows Compatibility Layer (Binary Emulator and Library)
ii  wine1.8                                       1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1             amd64        Microsoft Windows Compatibility Layer (Binary Emulator and Library)
ii  wine1.8-amd64                                 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1             amd64        Microsoft Windows Compatibility Layer (64-bit support)
ii  wine1.8-i386:i386                             1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1             i386         Microsoft Windows Compatibility Layer (32-bit support)
iU  wine32:i386                                   3.0-1ubuntu1                                    i386         Windows API implementation - 32-bit binary loader
iU  wine64                                        3.0-1ubuntu1                                    amd64        Windows API implementation - 64-bit binary loader
ii  winetricks                                    0.0+20180217-1                                  all          package manager for Wine to install software easily

EDIT 3:

$ sudo dpkg --add-architecture i386

$ sudo apt update

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]    
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease                     
Hit:4 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:5 http://archive.canonical.com bionic InRelease                            
Get:6 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6.259 B]      
Err:6 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [38,5 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [17,6 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [41,5 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42,1 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16,4 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Hit:15 http://tr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:16 http://tr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:17 http://tr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done                       
W: GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

~$ sudo apt install wine-stable wine64 wine32:i386

wine64Reading package lists... Done
Building dependency tree       
Reading state information... Done
wine-stable is already the newest version (3.0-1ubuntu1).
wine64 is already the newest version (3.0-1ubuntu1).
wine64 set to manually installed.
wine32:i386 is already the newest version (3.0-1ubuntu1).
wine32:i386 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 wine32:i386 : Depends: libwine:i386 (= 3.0-1ubuntu1) but it is not going to be installed
 wine64 : Depends: libwine (= 3.0-1ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

sudo apt purge wine1.6 wine1.8 wine1.8-amd64 wine1.8-i386:i386

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 wine32:i386 : Depends: libwine:i386 (= 3.0-1ubuntu1) but it is not going to be installed
 wine64 : Depends: libwine (= 3.0-1ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
  • 1
    Please re-add your sources lists with command - grep -v ^# /etc/apt/sources.list /etc/apt/sources.list.d/*.list and add output of apt-cache policy wine32:i386 wine64 libwine:i386 to the question. Also add the full command which you used for Wine installation. – N0rbert Jan 22 '20 at 17:48
  • 1
    @N0rbert Please see edits, also, can you tell a bit about what we are looking at – dusa Jan 22 '20 at 22:03
  • 1
    Previously I was thinking that you have some conflict of Wine deb-package versions. But you have installed it from source. Did you use checkinstall to create local deb-packages from the compiled source? What is the output of apt-cache policy wine-stable? How many Wine-related packages do you have? Please add output of dpkg -l | grep -i wine. – N0rbert Jan 22 '20 at 22:11
  • @N0rbert please see the EDIT 2, I haven't used checkinstall, I will also look into it but I think my problem is rather the dependencies? – dusa Jan 23 '20 at 7:22
  • 1
    Does this answer your question? How do I fix the GPG error "NO_PUBKEY"? – karel Jul 25 '20 at 5:20
1

For me it seems that you forgot to add i386 architecture to the list of CPU architectures supported by dpkg.

I would suggest to add this CPU architecture with command below:

sudo dpkg --add-architecture i386
sudo apt update

And then install wine as you have already requested:

sudo apt install wine-stable wine64 wine32:i386 wine64

Or if you need to install latest Wine - follow official WineHQ guide for Ubuntu but change bionic to xenial (as the bionic packages are not installable) as follows:

wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key

sudo apt-add-repository -r "deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main"
# ^ remove broken repository for 18.04 LTS

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'  
# ^ add 16.04 LTS repository instead

## Install one of WineHQ packages:
# Stable branch     
sudo apt install --install-recommends winehq-stable

#Development branch     
#sudo apt install --install-recommends winehq-devel

#Staging branch     
#sudo apt install --install-recommends winehq-staging

Optionally you may want to remove old versions of Wine packages with

sudo apt purge wine1.6 wine1.8 wine1.8-amd64 wine1.8-i386:i386
  • 1
    Please see my latest edits, it just keeps coming down to the same error for some reason :/ – dusa Jan 23 '20 at 22:16
  • 2
    Please carefully follow the guide above. Your apt-get update contains line about missed "GPG...NO_PUBKEY" key, you can fix it with wget -nc https://dl.winehq.org/wine-builds/winehq.key, sudo apt-key add winehq.key, and then run sudo apt-get update. It should fix the problem with winehq-stable package which is available in dl.winehq.org repository. – N0rbert Jan 24 '20 at 18:18
  • Hey thanks but this also didn't fix the problem. I executed each step and they seemed to work but, the problems persist when I try to install -anything- – dusa Jul 8 '20 at 18:28
1

After Rambling for days I have finally found a solution. The thing is Ubuntu do not come with everything required to install "WINE". In this case it is the 32bit dependencies.That's why this error occurs no matter what you do.

All the solutions on the internet I saw based upon if you have missed some steps. But after doing the same things from different sources for thousands of time I understood there was some other problems.

So this is what I did :

First I uninstalled the entire wine dependencies, sources , libraries from my computer by using :

sudo apt-get --purge remove wine

This doesn't remove the wine completely, So I visited the following directories and removed the following files :

`cd $HOME`

`rm -r .wine`

`rm .config/menus/applications-merged/wine*`

`rm -r .local/share/applications/wine`

`rm .local/share/desktop-directories/wine*`

`rm .local/share/icons/????_*.xpm`

If you want you can run this command again :

sudo apt-get --purge remove wine

Then I ran this command to correct any broken Files

sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

After that I searched on google for :

how to enable 32 bit architecture in ubuntu 20

I came to this site :

https://support.humblebundle.com/hc/en-us/articles/202759400-Installing-32-bit-libs-on-a-64-bit-Linux-system

It said to install this in Ubuntu 12 or less version we have to run this command in terminal:

sudo apt-get install ia32-libs 

And For the new versions :

sudo apt-get install lib32z1

I have Ubuntu 20 So I went with the second approach. After this as mentioned in the wine's official website I proceeded And magically installed the wine.

This is the official website if you are wondering:

https://wiki.winehq.org/Ubuntu

Hope this solution might help you in solving the problems.

  • 1
    Please do not send the same answer to different questions. Per policy, we've removed the duplicates and left the first of your answers intact. If the questions all discuss the same thing, once you had enough reputation it would be better to flag the questions as duplicates of one of the questions rather than post the same answer numerous times. – Ravexina Jul 25 '20 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.