Doublon dans les cibles

Bonjour,

Je ne suis pas du tout à l'aise avec les manipulations de librairies. Quelqu'un peut il m'aider svp?
je suis sur ubuntu 18.04 lts et mon problemes est ceci.
W: La cible Packages (main/binary-amd64/Packages) est spécifiée plusieurs fois dans /etc/apt/sources.list:56 et /etc/apt/sources.list:66
W: La cible Packages (main/binary-i386/Packages) est spécifiée plusieurs fois dans /etc/apt/sources.list:56 et /etc/apt/sources.list:66
W: La cible Packages (main/binary-all/Packages) est spécifiée plusieurs fois dans /etc/apt/sources.list:56 et /etc/apt/sources.list:66
Qui peu m'aider a nettoyer ? quelle commande??
Merci d'avance

Configuration: Linux / Chrome 87.0.4280.88

3 réponses

  • Votes
  • Date
  • Date décroissante
  1. Bonjour,
    Tout d'abord, ce ne sont que des messages d'avertissement (W= warning), ces doublons n'ont aucune incidence sur le bon fonctionnement de apt.

    Si tu veux corriger ça, il faut éditer le fichier/etc/apt/sources.list et supprimer la ligne qui est en double.

    Pour éditer le fichier (en root) :
    sudo nano /etc/apt/sources.list

    Déplace-toi dans le texte avec les touches fléchées
    Supprime la ligne 66 qui est un doublon de la ligne 56
    Enregistre la modification : ctrl+O.
    Il faut faire un
    sudo apt update
    ensuite et tu ne devrais plus avoir ce warning.

    https://doc.ubuntu-fr.org/sources.list
    1. Je sais que cela n’empêche pas fonnctionner, mais c'est trés embetant , c'est sale.
      Je vais supprimer les doublons petit a petit a mon aise.
      Je vous remerci beaucoup pour votre aide.
      Bonne soirée
      1. Fais une sauvegarde du fichier sources.list avant pour le cas où...
        sudo cp /etc/apt/sources.list /etc/apt/sources.list.sav


        En cas de problème pour revenir à l'état initial :
        sudo mv /etc/apt/sources.list.sav /etc/apt/sources.list
      2. @jns55Bonjour,

        Est il possible lorsque je tapes sudo cp /etc/apt/sources.list /etc/apt/sources.list.sav , il se passe rien
        voir la copie ???
        maurice@maurice-Aspire-7738:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.sav
        maurice@maurice-Aspire-7738:~$

        merci d'avance et bon week end
      3. Contributeur
        @xxadonisSalut,

        Avec l'option "-v" de la commande
        cp
        tu peux avoir un retour visuel sur le terminal.
        sudo cp -v /etc/apt/sources.list /etc/apt/sources.list.sav


        Maintenant pour voir la copie il te suffit de lister le répertoire où se trouve lesdits fichiers :
        ls -ld /etc/apt/sources* 
      4. @zipe31Désolé, toujours rien
        root@maurice-Aspire-7738:/home/maurice# sudo cp -v /etc/apt/sources.list /etc/apt/sources.list.sav
        '/etc/apt/sources.list' -> '/etc/apt/sources.list.sav'
        root@maurice-Aspire-7738:/home/maurice#
      5. Contributeur
        @xxadonis
        '/etc/apt/sources.list' -> '/etc/apt/sources.list.sav'
        et ça c'est quoi ?
    2. Bonjour,

      J'aimerai bien supprimer tous ces warnings, j'ai une longue liste.
      Lorsque je fais sudo nano /etc/apt/sources.list, je trouve pas la ligne 66, ce serait trés aimable de votre par de me l'indiquer , ci joint le tableau
      # deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bi$
      deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted #Added by softw$

      # See https://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
      # newer versions of the distribution.
      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic main restricted
      # deb-src http://be.archive.ubuntu.com/ubuntu/ bionic main restricted

      ## Major bug fix updates produced after the final release of the
      ## distribution.
      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic-updates main restricted
      # deb-src http://be.archive.ubuntu.com/ubuntu/ bionic-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://ubuntu.mirror.true.nl/ubuntu/ bionic universe
      # deb-src http://be.archive.ubuntu.com/ubuntu/ bionic universe
      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic-updates universe
      # deb-src http://be.archive.ubuntu.com/ubuntu/ bionic-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://ubuntu.mirror.true.nl/ubuntu/ bionic multiverse
      # deb-src http://be.archive.ubuntu.com/ubuntu/ bionic multiverse
      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic-updates multiverse
      # deb-src http://be.archive.ubuntu.com/ubuntu/ bionic-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://ubuntu.mirror.true.nl/ubuntu/ bionic-backports main restricted unive$
      # deb-src http://be.archive.ubuntu.com/ubuntu/ bionic-backports main restricted$
      ## 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/ bionic partner
      deb-src http://archive.canonical.com/ubuntu/ bionic partner

      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic-security main restricted
      # deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted
      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic-security universe
      # deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe
      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic-security multiverse
      # deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse
      deb http://ubuntu.mirror.true.nl/ubuntu/ bionic-proposed main multiverse restri$
      # deb-src http://archive.canonical.com/ubuntu/ bionic partner
      ###### Ubuntu Main Repos
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiv$

      ###### Ubuntu Update Repos
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-security main restricted univer$
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-updates main restricted univers$
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-backports main restricted unive$

      ###### Ubuntu Partner Repo
      deb http://archive.canonical.com/ubuntu/ bionic partner
      ###### Ubuntu Main Repos
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiv$

      ###### Ubuntu Update Repos
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-security main restricted univer$
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-updates main restricted univers$
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-backports main restricted unive$

      ###### Ubuntu Partner Repo
      deb http://archive.canonical.com/ubuntu/ bionic partner
      ###### Ubuntu Main Repos
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiv$

      ###### Ubuntu Update Repos
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-security main restricted univer$
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-updates main restricted univers$
      deb http://nl.archive.ubuntu.com/ubuntu/ bionic-backports main restricted unive$

      ###### Ubuntu Partner Repo
      deb http://archive.canonical.com/ubuntu/ bionic partner

      Eventuellement grisé la partie que je dois supprimer
      Bonne journée et merci d'avance

      1. Contributeur
        Salut,

        nano -l /etc/apt/sources.list
        affichera les numéros de lignes.
      2. C'est franchement le bazar dans ton sources.list : certains dépôts sont en triple exemplaire !
        Tu peux supprimer toute la fin du fichier de façon à ne garder qu'une seule occurrence de :

        ###### Ubuntu Update Repos
        deb http://nl.archive.ubuntu.com/ubuntu/ bionic-security main restricted univer$
        deb http://nl.archive.ubuntu.com/ubuntu/ bionic-updates main restricted univers$
        deb http://nl.archive.ubuntu.com/ubuntu/ bionic-backports main restricted unive$

        ###### Ubuntu Partner Repo
        deb http://archive.canonical.com/ubuntu/ bionic partner
        ###### Ubuntu Main Repos
        deb http://nl.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiv$

        Mais encore une fois ça n'empêche nullement ton pc de fonctionner normalement alors si tu as un doute ou peur de faire une bêtise, laisse comme ça.