web-dev-qa-db-fra.com

Désinstallez QGIS et ne pouvez plus le réinstaller ("E: Impossible de corriger les problèmes, vous avez des packages endommagés.")

J'utilise Ubuntu version 16.04. Tout a commencé lorsque je voulais tester une pré-version d'un logiciel appelé QGIS. J'avais du mal à le mettre à jour vers la nouvelle version (2.99) et il m'a conseillé de désinstaller la version actuelle (2.18), ce que j'ai fait.

Maintenant, je ne peux installer ni la version 2.99, ni la version 2.18. Je veux juste que la version 2.18 soit réinstallée parce que j'en ai vraiment besoin.

Fondamentalement, pour installer QGIS 2.18, j’utilisais les commandes suivantes:

Sudo apt-get update
Sudo apt-get install qgis python-qgis qgis-plugin-grass

Mais quand je le fais, j'obtiens cette erreur:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-qgis : Depends: python-qscintilla2 but it is not going to be installed
 qgis-plugin-grass : Depends: grass703
E: Unable to correct problems, you have held broken packages.

J'ai essayé d'installer grass703 manuellement (le nom du paquet est en fait grass-core), mais il est indiqué que la version la plus récente est déjà utilisée (7.2.1-1~xenial1).

J'ai également essayé de rechercher les paquets en attente avec la commande dpkg --get-selections | grep hold, qui ne renvoie rien.

J'ai trouvé ce qui semblait être le même problème ici , mais j'ai essayé la suggestion dans la seule réponse, ce qui n'a pas fonctionné. Le seul autre retour était (à mon avis, une réprimande plutôt sarcastique et inutile) en leur disant de désinstaller tous les paquets de cette source. J'ai installé purge-ppa et supprimé tout le contenu de la source non ubuntu (-o ubuntugis, en référence à la équipe d'ubuntugis , sur laquelle j'avais précédemment installé des paquets pour essayer de créer la 2.99 version de QGIS fonctionne.) Toujours aucune aide, et QGIS lui-même ne sera pas installé.

Aucune quantité de Sudo apt-get update ne semblera résoudre le problème et je commence à désespérer. Quelqu'un at-il une idée de comment je peux résoudre ce problème? Je dois vraiment installer QGIS à nouveau dans une certaine capacité de travail.

Voici le contenu de mon /etc/apt/sources.list:

# deb cdrom:[Xubuntu 16.04.1 LTS _Xenial Xerus_ - Release AMD64 (20160719)]/ xenial main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## 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
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://de.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://de.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://de.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 http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://de.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 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
deb http://qgis.org/debian xenial main
deb-src http://qgis.org/debian xenial main

#deb http://qgis.org/debian-nightly xenial main
#deb-src http://qgis.org/debian-nightly xenial main
#deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main

et voici le contenu de sources.list.d/:

-rw-r--r-- 1 root root 146 Jan  5 12:49 colingille-ubuntu-freshlight-xenial.list
-rw-r--r-- 1 root root 146 Jan  5 12:49 colingille-ubuntu-freshlight-xenial.list.save
-rw-r--r-- 1 root root 222 Jan  5 12:49 cooperjona-ubuntu-nitrotasks-xenial.list
-rw-r--r-- 1 root root 222 Jan  5 12:49 cooperjona-ubuntu-nitrotasks-xenial.list.save
-rw-r--r-- 1 root root 158 Jan  5 12:49 fyrmir-ubuntu-livewallpaper-stable-xenial.list
-rw-r--r-- 1 root root 158 Jan  5 12:49 fyrmir-ubuntu-livewallpaper-stable-xenial.list.save
-rw-r--r-- 1 root root 189 Jan  5 12:49 google-chrome.list
-rw-r--r-- 1 root root 189 Jan  5 12:49 google-chrome.list.save
-rw-r--r-- 1 root root 175 Jan  5 12:49 google-earth.list
-rw-r--r-- 1 root root 175 Jan  5 12:49 google-earth.list.save
-rw-r--r-- 1 root root 180 Jan  5 12:49 google-talkplugin.list
-rw-r--r-- 1 root root 180 Jan  5 12:49 google-talkplugin.list.save
-rw-r--r-- 1 root root 150 Jan  5 12:49 kakrueger-ubuntu-openstreetmap-xenial.list
-rw-r--r-- 1 root root 150 Jan  5 12:49 kakrueger-ubuntu-openstreetmap-xenial.list.save
-rw-r--r-- 1 root root 146 Jan  5 12:49 kubuntu-ppa-ubuntu-backports-xenial.list
-rw-r--r-- 1 root root 146 Jan  5 12:49 kubuntu-ppa-ubuntu-backports-xenial.list.save
-rw-r--r-- 1 root root  89 Jan  5 12:49 lightzone.list
-rw-r--r-- 1 root root  89 Jan  5 12:49 lightzone.list.save
-rw-r--r-- 1 root root 501 Jan  5 12:49 mysql.list
-rw-r--r-- 1 root root 500 Jan  5 12:49 mysql.list.save
-rw-r--r-- 1 root root 246 Jan  5 12:49 nathan-renniewaldock-ubuntu-qdirstat-xenial.list
-rw-r--r-- 1 root root 246 Jan  5 12:49 nathan-renniewaldock-ubuntu-qdirstat-xenial.list.save
-rw-r--r-- 1 root root 144 Jan  5 12:49 nilarimogard-ubuntu-webupd8-xenial.list
-rw-r--r-- 1 root root 144 Jan  5 12:49 nilarimogard-ubuntu-webupd8-xenial.list.save
-rw-r--r-- 1 root root 124 Jan  5 12:49 pgdg.list
-rw-r--r-- 1 root root 124 Jan  5 12:49 pgdg.list.save
-rw-r--r-- 1 root root 207 Jan  5 12:49 pipelight-ubuntu-stable-xenial.list
-rw-r--r-- 1 root root 207 Jan  5 12:49 pipelight-ubuntu-stable-xenial.list.save
-rw-r--r-- 1 root root 126 Jan  5 12:49 shutter-ubuntu-ppa-xenial.list
-rw-r--r-- 1 root root 126 Jan  5 12:49 shutter-ubuntu-ppa-xenial.list.save
-rw-r--r-- 1 root root  56 Jan  5 12:49 skype-stable.list
-rw-r--r-- 1 root root  56 Jan  5 12:49 skype-stable.list.save
-rw-r--r-- 1 root root 148 Jan  5 12:49 Steam.list
-rw-r--r-- 1 root root 148 Jan  5 12:49 Steam.list.save
-rw-r--r-- 1 root root 198 Jan  5 12:49 ubuntugis-ubuntu-ppa-xenial.list
-rw-r--r-- 1 root root 130 Jan  5 12:49 ubuntugis-ubuntu-ppa-xenial.list.save
-rw-r--r-- 1 root root 136 Jan  5 12:49 webupd8team-ubuntu-Java-xenial.list
-rw-r--r-- 1 root root 136 Jan  5 12:49 webupd8team-ubuntu-Java-xenial.list.save
-rw-r--r-- 1 root root 136 Jan  5 12:49 wine-ubuntu-wine-builds-xenial.list
-rw-r--r-- 1 root root 136 Jan  5 12:49 wine-ubuntu-wine-builds-xenial.list.save

Les résultats de aptitude search ?obsolete:

i   fme-desktop-2017                                       - FME Desktop 2017.1.2 Full Installer                             
i   geoda                                                  - GeoDa Software                                                  
i   google-earth-stable                                    - Explore, search and discover the planet                         
i   hl3040cncupswrapper:i386                               - Brother CUPS Inkjet Printer Definitions                         
i   hl3040cnlpr:i386                                       - Brother lpr Inkjet Printer Definitions                          
i   projectlibre                                           - A desktop replacement for Microsoft Project                     
i   rainlendar2-lite                                       - Customizable desktop calendar                                   
i   rstudio                                                - RStudio   

Sortie de grep -v "^#" -r /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sort | uniq::

/etc/apt/sources.list:
/etc/apt/sources.list.d/colingille-ubuntu-freshlight-xenial.list:deb http://ppa.launchpad.net/colingille/freshlight/ubuntu xenial main
/etc/apt/sources.list.d/cooperjona-ubuntu-nitrotasks-xenial.list:deb http://ppa.launchpad.net/cooperjona/nitrotasks/ubuntu xenial main
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://qgis.org/debian xenial main
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb-src http://qgis.org/debian xenial main
/etc/apt/sources.list.d/fyrmir-ubuntu-livewallpaper-stable-xenial.list:deb http://ppa.launchpad.net/fyrmir/livewallpaper-stable/ubuntu xenial main
/etc/apt/sources.list.d/google-chrome.list:deb [Arch=AMD64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/google-earth.list:deb http://dl.google.com/linux/earth/deb/ stable main
/etc/apt/sources.list.d/google-talkplugin.list:deb http://dl.google.com/linux/talkplugin/deb/ stable main
/etc/apt/sources.list.d/kakrueger-ubuntu-openstreetmap-xenial.list:deb http://ppa.launchpad.net/kakrueger/openstreetmap/ubuntu xenial main
/etc/apt/sources.list.d/kubuntu-ppa-ubuntu-backports-xenial.list:deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu xenial main
/etc/apt/sources.list.d/lightzone.list:deb http://download.opensuse.org/repositories/home:/ktgw0316:/LightZone/xUbuntu_15.10/ /
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-5.7
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-apt-config
/etc/apt/sources.list.d/mysql.list:deb http://repo.mysql.com/apt/ubuntu/ xenial mysql-tools
/etc/apt/sources.list.d/mysql.list:deb-src http://repo.mysql.com/apt/ubuntu/ xenial mysql-5.7
/etc/apt/sources.list.d/nathan-renniewaldock-ubuntu-qdirstat-xenial.list:deb http://ppa.launchpad.net/nathan-renniewaldock/qdirstat/ubuntu xenial main
/etc/apt/sources.list.d/nilarimogard-ubuntu-webupd8-xenial.list:deb http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu xenial main
/etc/apt/sources.list.d/pgdg.list:deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
/etc/apt/sources.list.d/pipelight-ubuntu-stable-xenial.list:deb http://ppa.launchpad.net/pipelight/stable/ubuntu xenial main
/etc/apt/sources.list.d/shutter-ubuntu-ppa-xenial.list:deb http://ppa.launchpad.net/shutter/ppa/ubuntu xenial main
/etc/apt/sources.list.d/skype-stable.list:deb [Arch=AMD64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/Steam.list:deb [Arch=AMD64,i386] http://repo.steampowered.com/Steam/ precise Steam
/etc/apt/sources.list.d/Steam.list:deb-src [Arch=AMD64,i386] http://repo.steampowered.com/Steam/ precise Steam
/etc/apt/sources.list.d/ubuntugis-ubuntu-ppa-xenial.list:deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu xenial main
/etc/apt/sources.list.d/webupd8team-ubuntu-Java-xenial.list:deb http://ppa.launchpad.net/webupd8team/Java/ubuntu xenial main
/etc/apt/sources.list.d/wine-ubuntu-wine-builds-xenial.list:deb http://ppa.launchpad.net/wine/wine-builds/ubuntu xenial main
2
wfgeo

Pendant chat , nous avons procédé comme suit pour résoudre le problème:

  1. Référentiels obsolètes désactivés de software-properties-gtk:

download.opensuse.org/...
ppa.launchpad.net/colingille/...
ppa.launchpad.net/cooperjona/...
ppa.launchpad.net/kakrueger/...

  1. Purgé deux AAE avec

    Sudo ppa-purge ppa:ubuntugis/ppa
    Sudo ppa-purge ppa:kubuntu-ppa/backports
    Sudo apt-get install -f
    Sudo dpkg --configure -a
    

deuxième d'entre eux fait problème avec python-qscintilla2

  1. Puis installé QGIS à partir du référentiel qgis.org avec la commande suivante

    Sudo apt-get install qgis python-qgis qgis-plugin-grass
    
  2. Lancement de QGIS et vérification de l’intégrité du système avec

    Sudo apt-get check
    
2
N0rbert