0

I am sort of new to Linux, and completely new to Ubuntu (20.10) as a whole.. I switched from Windows recently and have installed Wine to play Windows games, but it has completely messed up after installation. If I try to "sudo apt-get update" or "sudo apt update", it does nothing and gives an error which is:

E: Malformed entry 1 in list file /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds-ubuntu_focal-groovy.list (Component)
E: The list of sources could not be read.
E: Malformed entry 1 in list file /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds-ubuntu_focal-groovy.list (Component)
E: The list of sources could not be read.

I have tried completely reinstalling wine as a whole, and going into the file itself to try and fix it to the best I can but nothing is working. I couldn't even uninstall because it gives me the error. Coming here to ask is my last resort, and hopefully this can be fixed with the help of others.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
tinu
  • 3
  • Most folks who run into this classic problem made two new-user mistakes: They went online to look for software instead of going to the Ubuntu Software application, then they made a mistake (typo) following those online instructions. There's a very good version of Wine already in Ubuntu Software that requires literally one click to install and is guaranteed compatible with your release of Ubuntu. However, you likely cannot use that until your current mess is cleaned up. – user535733 Mar 24 '21 at 22:23

1 Answers1

1

Here's one way.

  1. Delete the problematic file:

    sudo rm /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds-ubuntu_focal-groovy.list

    • You don't own that file. Root owns it, that's why you need sudo.

    • The file you are deleting is simply a text file. It contains an URL to the source that contains an upstream version of Wine.

    • That upstream source is a deb-package repository. Ubuntu automatically ensures that the packages you choose to install are not interfered with during downloading. However, anybody can host a repository -- checking the trustworthiness and compatibility of a source is your job (you are the human).

  2. Since you just changed your list of sources, update your database of available packages:

    sudo apt update

    • It's a good habit: ALWAYS update your database after EVERY change of sources.
  3. Install Wine:

    sudo apt install wine

    • Apt will download and install from whatever source has the newest version of Wine. That's one big reason to limit the number of sources.

    • Since you just deleted the (upstream) winehq repository, apt will discover wine packages in the existing Ubuntu Repositories. Since that's now the newest available to apt, that's what will get installed.

    • Pro Tip: Most new users don't need many new sources -- the Ubuntu repositories have all the software most folks need for common use.

user535733
  • 62,253