Target Packages (main/binary-amd64/Packages) is configured multiple times

Questions about Wine on Linux
Locked
nazchy
Newbie
Newbie
Posts: 4
Joined: Thu Nov 23, 2023 8:57 pm

Target Packages (main/binary-amd64/Packages) is configured multiple times

Post by nazchy »

I get this error message after every update to Linux Mint. What should I do?

W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/winehq-focal.sources:1
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/winehq-focal.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/winehq-focal.sources:1
W: Target Translations (main/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/winehq-focal.sources:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/winehq-focal.sources:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/winehq-focal.sources:1
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/additional-repositories.list:1 and /etc/apt/sources.list.d/winehq-focal.sources:1
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Target Packages (main/binary-amd64/Packages) is configured multiple times

Post by jkfloris »

You added the Wine repository twice. Remove one of them.
Which repository is enabled in "additional-repositories.list"?

Code: Select all

cat /etc/apt/sources.list.d/additional-repositories.list
nazchy
Newbie
Newbie
Posts: 4
Joined: Thu Nov 23, 2023 8:57 pm

Re: Target Packages (main/binary-amd64/Packages) is configured multiple times

Post by nazchy »

lwd@lwd-OptiPlex-755:~$ cat /etc/apt/sources.list.d/additional-repositories.list
deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Target Packages (main/binary-amd64/Packages) is configured multiple times

Post by jkfloris »

You can remove the "deb https://dl.winehq.org/wine-builds/ubuntu/ focal main" line from the "additional-repositories.list"
or put a # in front of it. This will prevent apt from reading the line.

Code: Select all

# deb https://dl.winehq.org/wine-builds/ubuntu/ focal main
Once this is done, you need to tell apt to use the new configuration:

Code: Select all

sudo apt update
nazchy
Newbie
Newbie
Posts: 4
Joined: Thu Nov 23, 2023 8:57 pm

Re: Target Packages (main/binary-amd64/Packages) is configured multiple times

Post by nazchy »

I found the additional repositories text file but it won't let me save any changes in text editor ... says 'read only' and 'you don't have permission to..."
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Target Packages (main/binary-amd64/Packages) is configured multiple times

Post by jkfloris »

You must be "root" to edit the file. There are probably two ways to do this:
- Right click on the file and select "Open as root".
- with sudo

Code: Select all

sudo xed /etc/apt/sources.list.d/additional-repositories.list
xed is the default text editor in Linux Mint, but you may not have it installed.
If that's the case, replace "xed" with the name of your notepad program.
For example

Code: Select all

sudo gedit /etc/apt/sources.list.d/additional-repositories.list
nazchy
Newbie
Newbie
Posts: 4
Joined: Thu Nov 23, 2023 8:57 pm

Re: Target Packages (main/binary-amd64/Packages) is configured multiple times

Post by nazchy »

YES! That did it. I got a bit worried when I saw multiple warnings like these :

(xed:5119): Gtk-CRITICAL **: 18:57:27.262: gtk_notebook_get_tab_label: assertion 'list != NULL' failed
** (xed:5119): WARNING **: 18:57:27.442: Set document metadata failed: Setting attribute metadata::xed-position not supported
...then I did
lwd@lwd-OptiPlex-755:~$ sudo apt update ...and all seems well.
No more errors after my Linux update today.
My only experience with command lines was with MS DOS in the 1980s and a few windows crashes since.
Thanks for your expert help.
Locked