Unable to install Wine on Ubuntu 20.04.2.0

Questions about Wine on Linux
Locked
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

I'm re-sending my post this time with the forum code-tag (sorry for the mistake, I'm new here).

I just installed Ubuntu on this computer then tried to install Wine but it didn't work. Here's the detailed script of the events:

1) I installed Unbuntu 20.04.2.0 with the minimal option (a fresh install)
2) I did all the updates
3) I installed VLC, Libre Office 7.1 and the game O.A.D. That's it, nothing else.
4) I then started the process to install Wine
5) I did a check for my version just to be sure

Code: Select all

me@Computer:~$ sudo dpkg --add-architecture i386
[sudo] password for me: 
6) I then started the installation of Wine and got an error message at the end:

Code: Select all

e@Computer:~$ wget -nc https://dl.winehq.org/wine-builds/winehq.key
--2021-04-25 18:53:25--  https://dl.winehq.org/wine-builds/winehq.key
Resolving dl.winehq.org (dl.winehq.org)... 151.101.138.217
Connecting to dl.winehq.org (dl.winehq.org)|151.101.138.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3220 (3.1K) [application/pgp-keys]
Saving to: ‘winehq.key’

winehq.key          100%[===================>]   3.14K  --.-KB/s    in 0s      

2021-04-25 18:53:26 (14.0 MB/s) - ‘winehq.key’ saved [3220/3220]

me@Computer:~$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/focal main'
E: Malformed entry 58 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
7) I tried again, this time with a space just before "focal" but still an error message at the end:

Code: Select all

me@Computer:~$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
E: Malformed entry 58 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
What's wrong? It's a complete fresh install and there's a problem right from the start. I didn't check the file in question because I don't know how yet and wouldn't know what to look for. Can someone help me fix this problem and also to explain me how this happened so I can learn from that.

Thanks a lot
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by dimesio »

DiabloGamer wrote: Sun Apr 25, 2021 6:51 pm 7) I tried again, this time with a space just before "focal" but still an error message at the end:

Code: Select all

me@Computer:~$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
E: Malformed entry 58 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
Did you also delete the entry without the space that you had previously added? You need to.
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

Hi Dimesio. no i did not. How do I do that?
Also, I now have a warning on Ubuntu:
An error occurred, please run Package Manager from right-click menu or apt-get in terminal to see what is wrong. The error message was "Error:Opening the cache (E:Malformed entry 58 in list file /etc/apt/source.list (Component),E:The list of sources cannot be read.)'. This usually means that your installed packages have unmet dependencies
What should I do from there?
A) delete the entry without the space...how?
B) anything else you suggest?

Big thanks for the help!
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by dimesio »

Open /etc/apt/sources.list in a text editor and delete the line without the space. You will need to do it as sudo in order to save the edited file.
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

Hi Dimesio, maybe you forgot that I've mentioned that I'm new to this. Remember the very first day you tried Linux? Then you know how I feel right now lol. I have to do this as sudo.... OK, I know that sudo is the master of all master and make a mistake in sudo and it might be a nightmare! So what's the steps? I open the editor, but then what? How to be a sudo, etc.... I'm heading for trouble if I don't get the exact steps to do :(
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

and where's the folder for that file?
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

I managed to find the folder. In there I have:
sources.list (file)
sources.list.d (folder and it's empty)
sources.list.save (file)
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

Here's a screenshot of the permission. I understand that I need to elevate my rights and that I have to use the sudo command. But how??????
Attachments
Screenshot from 2021-04-27 11-45-46.png
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by dimesio »

Use sudo from the command line to run whatever text editor you want to use and open the file, e.g.

Code: Select all

sudo <texteditor> /etc/apt/sources.list
(substitute the actual command for your text editor of choice for <texteditor>).
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

OK, I did that.

Code: Select all

sudo nano /etc/apt/sources.list
You told me to delete one row, but I see two rows. Is it possible to send you privately the sources.list file so you can check it and tell me what to do (it could also be other problem on other lines, who knows)? We may save a lot of time and trouble like that :)
Also, nano doesn't show the line counts. Any suggestion for something better?

Thanks for all the help, much appreciated!
User avatar
MichaelPalin
Newbie
Newbie
Posts: 3
Joined: Wed Apr 28, 2021 10:50 am

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by MichaelPalin »

You could use gedit instead of nano.
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by dimesio »

DiabloGamer wrote: Wed Apr 28, 2021 2:00 am You told me to delete one row, but I see two rows.
Delete any rows that have the typo in them. If you're unsure, post the contents of the file here.
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

Here is the full content of sources.list file. Please let me know about anything wrong you can see in it and which lines to delete. Thx!

Code: Select all

 deb cdrom:[Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1)]/ focal main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal universe
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
deb https://dl.winehq.org/wine-builds/ubuntu/focal main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/focal main
deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ focal main
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by dimesio »

Delete these two lines:

Code: Select all

deb https://dl.winehq.org/wine-builds/ubuntu/focal main
# deb-src https://dl.winehq.org/wine-builds/ubuntu/focal main
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

OK, I did that and rebooted. Now the error icon at the top right has disappeared so it sounds good. I did the next step as told on your website:

Code: Select all

sudo apt update
And I am getting stuck again. On your website it says to update the packages then to install one of the following packages. (https://wiki.winehq.org/Ubuntu).
1) I'm confused. Why updating the packages BEFORE installing them??
2) I got a result saying that there are things that can be updated. Do I have to do them? Also, it's weird because I got a message from the live update about things ready for an update and did it and the sudo command says there are still things to be updated. Another thing, the way the writing is done on Wine's website is like we do the sudo update command and that's it then we install one of the 3 packages. But here I get that message about things to be updated. I thought the command was related to the wine stuff. Sorry if it sounds stupid, but those are me very first steps on Linux.

3) If I have to do the update, then how to do it?
I'm including a screen capture of what I got after the sudo apt update command:
Screenshot from 2021-04-29 16-25-31.png
Thanks for your help and patience Dimesio
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by dimesio »

The sudo apt update command doesn't install anything; it merely checks the metadata for all the repositories in your /etc/apt/sources.list--that's how it knows to tell you that there are other packages on your system that have newer versions available. You need to run it whenever you add a new repository, or apt won't know what's in it.

To actually upgrade the packages apt has identified as having newer versions, use sudo apt upgrade, which will upgrade everything that can be upgraded. If you only want to upgrade a specific packages, you will have to specify the package name in the command line.

If you need more general help on how to use your package manager, ask on the Ubuntu forum.
DiabloGamer
Level 2
Level 2
Posts: 10
Joined: Sun Apr 25, 2021 6:14 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by DiabloGamer »

OK, I undertsnad. sudo apt update is to check if there's any update available. And sudo apt upgrade is to update everything at once. I did it and it worked fine. I then installed the stable version and it worked fine.

Last question, at the bottom of the page https://wiki.winehq.org/Ubuntu it says:
Compiling WoW64
Ubuntu's implementation of Multiarch is still incomplete, so for now you can't simply install 32-bit and 64-bit libraries alongside each other. If you're on a 64-bit system, you'll have to create an isolated environment for installing and building with 32-bit dependencies. See Building Biarch Wine On Ubuntu for detailed instructions for Ubuntu using LXC, and Building Wine for general information.
Do I have to do that? I'm installing Wine so I can play Diablo on Unbuntu.
invisible kid
Level 5
Level 5
Posts: 353
Joined: Tue Dec 24, 2019 3:23 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by invisible kid »

Do I have to do that? I'm installing Wine so I can play Diablo on Unbuntu.
No. If you are able to install wine via a package manager, and it works, there is no need to build unless you wanted to tweak compile options or modify the source or something similar. The vast majority do not build.
AndyTulenko
Level 1
Level 1
Posts: 5
Joined: Mon May 10, 2021 8:05 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by AndyTulenko »

I am brand new to Linux. I have a 95% clean install of 20.04 and this thread was helping.
Now I've run into the dreaded line 58 error multiple times in a row and I'm stuck there. Is there a simple 1,2,3 step by step for doing this?
I may have run into issues because of the way I was installing things. Would it be better for me to just wipe it out and reinstall 20.04?
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by dimesio »

AndyTulenko wrote: Mon May 10, 2021 8:10 pm I am brand new to Linux. I have a 95% clean install of 20.04 and this thread was helping.
Now I've run into the dreaded line 58 error multiple times in a row and I'm stuck there. Is there a simple 1,2,3 step by step for doing this?
If you're talking about a "Malformed entry" error from apt, that means you have a typo in your /etc/apt/sources.list on the line the error message references and you need to either correct it or delete it. Instructions for how to do that have already been provided in this thread.
AndyTulenko
Level 1
Level 1
Posts: 5
Joined: Mon May 10, 2021 8:05 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by AndyTulenko »

Can I just replace the file?
AndyTulenko
Level 1
Level 1
Posts: 5
Joined: Mon May 10, 2021 8:05 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by AndyTulenko »

This is my error.

E: The repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' is not signed.
AndyTulenko
Level 1
Level 1
Posts: 5
Joined: Mon May 10, 2021 8:05 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by AndyTulenko »

Ok, I got this far:

E: Unable to locate package winehq-(stable-devel or staging, I tried them all)
AndyTulenko
Level 1
Level 1
Posts: 5
Joined: Mon May 10, 2021 8:05 pm

Re: Unable to install Wine on Ubuntu 20.04.2.0

Post by AndyTulenko »

I managed to get wine installed.
Now I need to figure out where to tell it the Windows update is done so I can install my other stuff.
Locked