Pacotes de destino configurados duas vezes… Mentiras

-2

ERRO:

W: Target Packages (partner/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target DEP-11 (partner/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Packages (partner/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Translations (partner/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target DEP-11 (partner/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1
W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:40 and /etc/apt/sources.list.d/canonical_partner.list:1

Eu usei um script que encontrei aqui para limpar duplicatas, e funciona, e recebi de volta "sem duplicatas".

Detecta e interativamente desativa entradas duplicadas do código-fonte do Apt.

Uso:

sudo python3 apt-remove-duplicate-source-entries.py
from __future__ import print_function
import aptsources.sourceslist

EMPTY_COMPONENT_LIST = (None,)

def get_duplicates(sourceslist):
    """
    Detects and returns duplicate Apt source entries.
    """

    sentry_map = dict()
    duplicates = list()
    for se in sourceslist.list:
        if not se.invalid and not se.disabled:
            for c in (se.comps or EMPTY_COMPONENT_LIST):
                key = (se.type, se.uri, se.dist, c)
                previous_se = sentry_map.setdefault(key, se)
                if previous_se is not se:
                    duplicates.append((se, previous_se))
                    break

    return duplicates


if __name__ == '__main__':
    try:
        input = raw_input
    except NameError:
        pass

    sourceslist = aptsources.sourceslist.SourcesList(False)
    duplicates = get_duplicates(sourceslist)

    if duplicates:
        for dupe, orig in duplicates:
            print(
                'Overlapping source entries:\n'
                '  1. {0}: {1}\n'
                '  2. {2}: {3}\n'
                'I disabled the latter entry.'.format(
                    orig.file, orig, dupe.file, dupe),
                end='\n\n')
            dupe.disabled = True

        print('\n{0} source entries were disabled:'.format(len(duplicates)),
            *[dupe for dupe, orig in duplicates], sep='\n  ', end='\n\n')
        if input('Do you want to save these changes? (y/N) ').upper() == 'Y':
            sourceslist.save()

    else:
        print('No duplicated entries were found.')

Verifiquei minha lista de fontes e não há duplicatas : link e link

Lista de fontes 2: 2.1m.yt/BJ84IEB.png (desculpe, apenas permitimos 2 links >. >)

kali@ADELL:/etc/apt/sources.list.d$ ls 
canonical_partner.list
canonical_partner.list.save
mefrio-g-ubuntu-plymouthmanager-xenial.list
mefrio-g-ubuntu-plymouthmanager-xenial.list.save
noobslab-ubuntu-macbuntu-xenial.list
noobslab-ubuntu-macbuntu-xenial.list.save
noobslab-ubuntu-themes-xenial.list
noobslab-ubuntu-themes-xenial.list.save
rodsmith-ubuntu-refind-xenial.list
rodsmith-ubuntu-refind-xenial.list.save
    
por Kali 31.05.2016 / 17:58

1 resposta

1

O.k. solução rápida para você:

sudo su
rm /etc/apt/sources.list.d/canonical_partner.list
rm /etc/apt/sources.list.d/canonical_partner.list.save

O próximo bloco que você pode copiar e colar completamente no terminal e pressionar enter uma vez:

cat > /etc/apt/sources.list << EOF
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
EOF
exit

Depois disso, basta fazer:

sudo apt-get update
sudo apt-get dist-upgrade

E tenho certeza de que suas mensagens de entrada dupla desapareceram.

    
por Videonauth 31.05.2016 / 18:17