Red Wine in a GlassHow to Install Wine on Ubuntu 20.04 LTSCSS HTML Validator Logo
HOME Tutorials & Essays About
Tutorials & Essays About

July 25, 2021

Ubuntu 20.04 screen shot

How to Install Wine on Ubuntu 20.04 LTS

Remote file
does not exist.

Facebook Logo   Twitter Logo  Reddit Logo   Quora Logo

Consider sharing your experience

Did you find this page helpful? Have constructive feedback? Wisdom to share?

Send email to Email Address

Privacy PolicyNew Window Icon

S.K. November 23, 2020

Hi David,

I have the following error while installing wine.

devil@devil:~$ sudo add-apt-repository 'deb focalmain'
E: Malformed entry 58 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.

Any help ?
Thank you.

T.C. November 24, 2020

Hi David

I am getting this error trying to add wine repository

trey@trey:~$ sudo add-apt-repository 'deb focal main'
[sudo] password for trey:
E: Malformed entry 58 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.

davidb November 25, 2020

S.K.'s error message is caused by a typo in his add-apt-repository command. A space is needed between focal and main.

T.C., on his own, listed the contents of /etc/apt/sources.list

$ cat /etc/apt/sources.list

which revealed a typo in its line 58. In this case, a space between …/ubuntu/ and focal was missing.

D.J. October 12, 2020

yes this page helped me install wine on Ubuntu 20.04 no hitches. wonderful :) thank you

W.B. August 1, 2020

… [On Linuxfx 10] I followed your instructions for updating WINE, and everything went OK until it came time to reload the Repositories. At that point I got several error messages such as this from Synaptic Package Manager …

davidb August 3, 2020

Linuxfx 10.4 is derived from Ubuntu 20.04, but the Ubuntu 20.04 procedure for installing Wine does not work for Linuxfx 10.4, so I made a page specifically for Linuxfx 10.4New Window Icon.

R.K. July 25, 2020

Hi David,
Really like your page on WINE install here:
However it does not work for me :(

After following the commands I get this error …

~$ 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.1~focal)
E: Unable to correct problems, you have held broken packages.

I also see around the net that others experience this problem too.

davidb July 26, 2020

I am very familiar with the error you encountered. I did re-check my Ubuntu 20.04 page by installing Wine on a fresh copy of Ubuntu 20.04, and the procedure given here remains correct.

WineHQ offers the following adviceNew Window Icon.

If you have previously installed a Wine package from another repository, please remove it and any packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) before attempting to install the WineHQ packages, as they may cause dependency conflicts.

If your system is 64 bit, enable 32 bit architecture (if you haven't already).

If apt complains about missing dependencies, install them, then repeat the last two steps (update and install). See the FAQ entry on dependency errorsNew Window Icon for tips on troubleshooting dependency issues.

To remove Wine, I suggest the following.

$ sudo apt list --installed | grep wine

That will list all installed packages which have "wine" in the package name. Then you can do

$ sudo apt purge packagename

for each package in the list that you want to remove (replacing packagename in the above command by names from the list, of course). Probably all listed packages will relate to Wine, but use your discretion.

If you installed Wine through Ubuntu's Software app, first use Software's uninstall option, and follow up with the above Terminal commands.

davidb August 1, 2020

After much unsuccessful effort, a clean install of the OS seemed the only way forward. Subsequent to the clean install of the OS, R.K. successfully installed Wine following the method on this page.