3

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

0
3

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.

9
  • 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 Jun 19 at 17:27
  • I see you updated your response, Can I proceed over the series of commands? – Yann Monnier Jun 19 at 17:29
  • Yes, they should help. – N0rbert Jun 19 at 17:29
  • 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 ,,,,,," – Yann Monnier Jun 19 at 17:44
  • 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. – N0rbert Jun 19 at 17:46
1

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

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

12
  • Hi Jamie. I followed the commands you placed . here are what I placed and the output: – Yann Monnier Jun 19 at 16:38
  • Hey! I can't see the output. Could you try again or split it up? – Jamie Jun 19 at 16:43
  • it was too long , so I re-edited the primary message – Yann Monnier Jun 19 at 16:48
  • 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 – Jamie Jun 19 at 16:53
  • after wget command, i received the following:yd@yd:~$ wget -qO- 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? – Yann Monnier Jun 19 at 17:02

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.