web-dev-qa-db-fra.com

Ubuntu 16.04 "Un problème est survenu lors de la vérification des mises à jour"

J'utilise Ubuntu 16.04 et tout à coup, APT est cassé et je ne peux pas ouvrir de terminal. Plus précisément, le cercle rouge avec un signe moins blanc apparaît dans la barre d’outils située en haut de la page et lorsque je clique dessus, le message indique A problem occurred when checking for the updates. Lorsque je clique sur Terminal, le pointeur de la souris se transforme en cercle pendant quelques secondes et rien ne se passe.

Je me rends compte que cela a souvent été demandé, mais j’ai essayé quelques-unes des autres solutions (par exemple, exécuter apt-get -f install, apt-get update, apt-get upgrade, commenter les PPA dans sources.list).

Voici le contenu de mon sources.list

# deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release AMD64 (20170215.2)]/ xenial 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/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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-src http://us.archive.ubuntu.com/ubuntu/ xenial-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 xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

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

J'ai aussi des PPA sous /etc/apt/sources.list.d:

  • dropbox.list
  • gerardpuig-ubuntu-ppa-xenial.list
  • atlassian-hipchat4.list
  • jonathonf-ubuntu-python-3_6-xenial.list
  • libreoffice-ubuntu-ppa-xenial.list
  • pgdg.list

J'ai aussi remarqué que même si j'avais lancé update/upgrade/dist-upgrade et redémarré, lorsque je me connecte à TTY1, il reste que j'ai 94 paquets à mettre à jour.

La seule chose que je faisais avant cela fonctionnait avec du code python. Je ne pense cependant pas avoir apporté de changement. J'ai modifié le lien symbolique par défaut Python pour qu'il pointe vers Python2, mais je l'ai repassé en Python3 et, malheureusement, cela n'a pas résolu le problème.

Merci.

5
Brooks

Pour alterner entre python version 3.X, exécutez simplement:

Sudo update-alternatives --config python3

Pour restaurer les mises à jour logicielles, entrez simplement le nombre de python 3.5.

6
BXL

Après l’installation de python3, j’ai changé le lien symbolique/usr/bin/python3 pour pointer vers python3.6 au lieu du runtime par défaut de python3.5.

Réinitialiser le lien symbolique pour pointer vers /usr/bin/python3.5 a tout corrigé.

2
Brooks

pour être précis, dans mon cas, cela m'a aidé: ouvrez Terminal (ou UXTerm ou Xterm si Terminal ne fonctionne pas) et tapez deux commandes:

Sudo rm /usr/bin/python3
Sudo ln -s /usr/bin/python3.5 /usr/bin/python3
1
Artur