Score:4

Problem with Wine installation (on Ubuntu 20.04)

in flag

From the "Ubuntu Softwares" folder, I attempted to install Wine.

After clicking on the installation button for Wine, I received this message:

Unable to install Wine. 
E: dpkg was interrupted upi must manually run dpkg -- configure a" to correct the problem.

Also I gave a try placing the first command on the terminal as indicated by numerous website:

yd@yd:~$ dpkg --add-architecture i386
dpkg: error: unable to create new file '/var/lib/dpkg/arch-new': Permission denied

I am new to Linux and Ubuntu. What would be the most appropriate course of action to fix this?

thx

Score:4
zw flag

You have enabled broken old repository.

To remove it use commands below:

sudo add-apt-repository -r ppa:teejee2008/ppa

Then to install wine you really do not need third-party repositories, so you have to disable all such previously added WineHQ repositories by:

sudo apt-add-repository -r "deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main"
sudo apt-add-repository -r "deb http://dl.winehq.org/wine-builds/ubuntu/ focal main"
sudo apt-add-repository -r "deb http://dl.winehq.org/wine-builds/ubuntu/ groovy main"
sudo apt-add-repository -r "deb http://dl.winehq.org/wine-builds/ubuntu/ hirsute main"

sudo apt-add-repository -r "deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main"
sudo apt-add-repository -r "deb https://dl.winehq.org/wine-builds/ubuntu/ focal main"
sudo apt-add-repository -r "deb https://dl.winehq.org/wine-builds/ubuntu/ groovy main"
sudo apt-add-repository -r "deb https://dl.winehq.org/wine-builds/ubuntu/ hirsute main"

and then update package lists, install updates, resume interrupted installations by

sudo dpkg --configure -a
sudo apt-get install -f

sudo apt-get update
sudo apt-get upgrade
sudo dpkg --configure -a
sudo apt-get install -f

And finally install Wine from official repositories by

sudo apt-get install wine

or better install PlayOnLinux (sudo apt-get install playonlinux) to install Windows applications using wizards.


Note: if you have problems with official default repositories, then re-add them by

sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs) main restricted universe multiverse"
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-updates main restricted universe multiverse"
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-security main restricted universe multiverse"
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs)-backports main restricted universe multiverse"

and retry above commands.

Yann Monnier avatar
in flag
AFTER the SUDO APT UPGRADE I received : You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libnss-systemd : Depends: systemd (= 247.3-3ubuntu3.1) libpam-systemd : Depends: systemd (= 247.3-3ubuntu3.1) systemd : Depends: libsystemd0 (= 247.3-3ubuntu3) but 247.3-3ubuntu3.1 is installed systemd-sysv : Depends: systemd (= 247.3-3ubuntu3.1) systemd-timesyncd : Depends: systemd (= 247.3-3ubuntu3.1) E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Yann Monnier avatar
in flag
I see you updated your response, Can I proceed over the series of commands?
N0rbert avatar
zw flag
Yes, they should help.
Yann Monnier avatar
in flag
After adding all the repositories with no problem (even the ones placed at the bottom), I placed the command "sudo dpkg --configure -a" The terminal indicates the same series of ",,,,,error processing package .... (--configure): dependency problems - leaving unconfigured ,,,,,,"
N0rbert avatar
zw flag
Please place full output of `grep -r ^deb /etc/apt --include=*.list` and full above error message with executed commands to pastebin. Or more complete - execute all commands from my answer answer and post full output to the pastebin.
Yann Monnier avatar
in flag
I am figuring out what is a pastebin. I believe I got it. Here is the link: https://paste.ubuntu.com/p/cVTHtKsXhs/
N0rbert avatar
zw flag
It is now better than it was before. Please run `sudo apt --fix-broken install` as system suggested.
Yann Monnier avatar
in flag
Ok. Here are the results: https://paste.ubuntu.com/p/R89Xn7FCBy/ Should I Proceed with the commands : sudo dpkg --configure -a sudo apt-get install -f sudo apt-get update sudo apt-get upgrade sudo dpkg --configure -a sudo apt-get install -f
N0rbert avatar
zw flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/126671/discussion-between-n0rbert-and-yann-monnier).
Score:1
cn flag

The installation instruction is documented on WineHQ website, to install wine on Ubuntu 20.04:

First run (as the message say):

sudo dpkg --configure -a

then:

sudo dpkg --add-architecture i386 
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' 
sudo apt update
sudo apt install --install-recommends winehq-stable
Score:-3
in flag

Welcome to Ubuntu! For someone new to Linux and AskUbuntu, that was an astounding question.

I'll run you through absolutely everything. Let's reinstall Wine correctly.

First of all, you will be prompted multiple times to enter Y/press enter or just press enter during installation. Make sure to do that! Also, when you enter a password in the terminal, it may not show your password but it is recording your inputs. Press enter and it will work even if it doesn't show the input!

Please follow my steps. Just copy/paste these into a terminal.

sudo dpkg --add-architecture i386
sudo apt update
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt install software-properties-commonsudo apt-add-repository "deb http://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main"
sudo apt install --install-recommends winehq-stable

Check your Wine status using wine --version. If there are no errors, you've made it!

Resources

Yann Monnier avatar
in flag
Hi Jamie. I followed the commands you placed . here are what I placed and the output:
Jamie avatar
in flag
Hey! I can't see the output. Could you try again or split it up?
Yann Monnier avatar
in flag
it was too long , so I re-edited the primary message
Jamie avatar
in flag
thanks for the input, i realized i had used a dead server that wine hq doesnt use anymore, this should help, just run the new commands again after reloading the page
Yann Monnier avatar
in flag
after wget command, i received the following:yd@yd:~$ wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). OK Should I continue?
Jamie avatar
in flag
yes, it will still work.
Yann Monnier avatar
in flag
yd@yd:~$ sudo apt install software-properties-common E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. Should I continue?
Jamie avatar
in flag
do what it says, run 'sudo dpkg --configure -a'
Yann Monnier avatar
in flag
After launching the command "sudo dpkg --configure -a" , the output of the terminal (too long to place here) states series of ",,,,,error processing package .... (--configure): dependency problems - leaving unconfigured ,,,,,," I believe it would be more adequate to edit a new question before dealing with the Wine issue.
Jamie avatar
in flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/126669/discussion-between-jamie-and-yann-monnier).
Jamie avatar
in flag
I hate to be petty but why exactly is my comment so hated? I just want to improve my usefulness but it seems like this was very hated despite me genuinely helping the OP.
Yann Monnier avatar
in flag
Hey Jamie, I did appreciate your help and your welcome. The process you indicated and our exchanges we had certainly help me (and others) to narrow down the issue. I was used to stack-exchange with Math. I do recall difficult back and forth. At the end of the day , we learn. thx again.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.