Como faço para remover pacotes quebrados que impedem novas instalações?

0

Eu tenho a tarefa de instalar o Privacy Preserving Identity Management Shibbol no nosso servidor Ubuntu. Para concluir a configuração, precisei limpar uma instalação padrão antiga do Pacote de Provedor de Serviços (libapache2-mod-shib2) e instalar um novo fornecido pela Autenticação e a Infra-estrutura de Autorização "SWITCH" ( link ).

Se eu tentar instalar o novo pacote, recebo o seguinte erro:

service@emdlw:~$ sudo apt-get install shibboleth
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:
 shibboleth : Depends: shibboleth-sp2-utils (>= 2.6.0)
              Recommends: libapache2-mod-shib2 (>= 2.6.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Depois de algumas pesquisas, eu segui as soluções de Como resolvo dependências não atendidas depois de adicionar um PPA? , mas nenhuma delas ajudou a resolver meu problema.

Meu palpite é que o gerenciador de pacotes do apt está corrompido porque o pacote "shibboleth-sp2-utils" parece estar instalado, mas não pode ser removido ou atualizado para resolver o erro de dependência:

service@emdlw:~$ sudo apt-get install shibboleth-sp2-utils
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:
 shibboleth-sp2-utils : Depends: libshibsp-plugins (= 2.6.0+dfsg1-3switchaai2~trusty1) but it is not going to be installed
                        Depends: libsystemd-daemon0 (>= 31) but it is not installable
E: Unable to correct problems, you have held broken packages.

Output cat /etc/apt/sources.list:

service@emdlw:~$ cat /etc/apt/sources.list
#

# deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.3)]/ xenial main restricted

# deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.3)]/ xenial main restricted

# 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-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

Cat de saída /etc/apt/sources.list.d / *:

service@emdlw:~$ cat /etc/apt/sources.list.d/*
deb http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial main
deb http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu xenial main
deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
deb http://pkg.switch.ch/switchaai/ubuntu trusty main
deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main

Alguém tem conselhos sobre como corrigir o problema? Qualquer ajuda seria apreciada.

  • Eric
por E. Jansen 22.04.2018 / 14:50

1 resposta

0

sudo apt-get --purge autoremove

remove pacotes órfãos, ou seja, pacotes instalados que costumavam ser instalados como uma dependência, mas não são mais. Use isso depois de remover um pacote que tinha dependências instaladas nas quais você não está mais interessado.

    
por CHARCHOUF SABRI 22.04.2018 / 15:04