O Apt não está funcionando devido a dependências não atendidas

1

Eu sei que este problema é falado em perguntar ao Ubuntu muitas vezes, mas eu ainda não consegui resolvê-lo com as soluções que encontrei.

A saída de sudo apt-get purge calibre é:

sudo: unable to resolve host ubuntu
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 click : Depends: python3-click-package (= 0.4.43+16.04.20160203-0ubuntu3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Qualquer outro comando apt levará a um erro de "dependências não atendidas". Os métodos mencionados em Como resolvo dependências não satisfeitas depois de adicionar um PPA? : sudo apt-get -f install ou sudo dpkg --configure -a ou removendo o ppa didn ' t ajuda.

Meu /etc/apt/sources.list é:

# deb cdrom:[Ubuntu-MATE 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main multiverse restricted  universe
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial main multiverse restricted universe #Added by   software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial main restricted
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial restricted multiverse #Added by software-properties

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-updates main restricted
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-updates universe restricted main multiverse #Added by   software-properties

## 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://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial universe
# deb-src http://hk.archive.ubuntu.com/ubuntu/ xenial universe
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-updates universe
# deb-src http://hk.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://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial multiverse
# deb-src http://hk.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-updates multiverse
# deb-src http://hk.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://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-backports main restricted universe multiverse #Added by     software-properties

## 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://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-security main restricted
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-security universe restricted main multiverse #Added by  software-properties
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

Meu /etc/apt/sources.list.d/* :

deb http://ppa.launchpad.net/accessibility-dev/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/accessibility-dev/ppa/ubuntu xenial main
deb http://ppa.launchpad.net/accessibility-dev/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/accessibility-dev/ppa/ubuntu xenial main
deb http://ppa.launchpad.net/flexiondotorg/hal-flash/ubuntu xenial main
deb-src http://ppa.launchpad.net/flexiondotorg/hal-flash/ubuntu xenial main
deb http://ppa.launchpad.net/flexiondotorg/hal-flash/ubuntu xenial main
deb-src http://ppa.launchpad.net/flexiondotorg/hal-flash/ubuntu xenial main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial main
deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial main
# deb-src http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial main
# deb http://ppa.launchpad.net/js-reynaud/kicad-4/ubuntu xenial main
# deb-src http://ppa.launchpad.net/js-reynaud/kicad-4/ubuntu xenial main
# deb http://ppa.launchpad.net/js-reynaud/kicad-4/ubuntu xenial main
# deb-src http://ppa.launchpad.net/js-reynaud/kicad-4/ubuntu xenial main
deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial main
deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial main
deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu xenial main
# deb http://ppa.launchpad.net/moka/daily/ubuntu xenial main
# deb-src http://ppa.launchpad.net/moka/daily/ubuntu xenial main
# deb http://ppa.launchpad.net/moka/daily/ubuntu xenial main
# deb-src http://ppa.launchpad.net/moka/daily/ubuntu xenial main
# deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04/ /
# deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04/ /
# deb http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /
# deb http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /
deb http://ppa.launchpad.net/plushuang-tw/uget-stable/ubuntu xenial main
deb-src http://ppa.launchpad.net/plushuang-tw/uget-stable/ubuntu xenial main
deb http://ppa.launchpad.net/plushuang-tw/uget-stable/ubuntu xenial main
deb-src http://ppa.launchpad.net/plushuang-tw/uget-stable/ubuntu xenial main
# deb https://dl.ring.cx/ring-nightly/ubuntu_16.04/ ring main
# deb https://dl.ring.cx/ring-nightly/ubuntu_16.04/ ring main
# deb http://archive.ubuntukylin.com:10006/ubuntukylin trusty main
# deb http://archive.ubuntukylin.com:10006/ubuntukylin trusty main
deb http://repository.spotify.com stable non-free
deb http://repository.spotify.com stable non-free
deb http://ppa.launchpad.net/stellarium/stellarium-releases/ubuntu xenial main
deb-src http://ppa.launchpad.net/stellarium/stellarium-releases/ubuntu xenial main
deb http://ppa.launchpad.net/stellarium/stellarium-releases/ubuntu xenial main
deb-src http://ppa.launchpad.net/stellarium/stellarium-releases/ubuntu xenial main
deb http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial main
deb-src http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial main
deb http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial main
deb-src http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial main

A saída de apt-cache policy python3-click-package é

python3-click-package:
  Installed: (none)
  Candidate: 0.4.43+16.04.20160203-0ubuntu2
  Version table:
     0.4.43+16.04.20160203-0ubuntu2 500
        500 http://hk.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Por favor, alguém me ajude a trazer meu Ubuntu de volta?

    
por iamlazynic 30.07.2016 / 09:02

1 resposta

0

Verifique seu /etc/hosts para ver se você tinha o endereço local correto e o endereço IP privado (se você não estiver executando o dhcp neste sistema).

Mas se você estiver executando o dhcp, então

sudo /usr/sbin/dhclient eth0
 ## eth0 or the name of your interface

Ele precisa se resolver primeiro antes que o sistema possa começar a fazer o download. Espero que você tenha uma pausa a partir deste ponto:

sudo apt-get autoclean ## discards any saved pkgs and start off with fresh ones
sudo dkpg -r calibre
sudo dkpg -r python3-click-package
sudo apt-get remove --purge calibre
sudo apt-get remove --purge python3-click-package
sudo apt-get dist-upgrade

sudo apt-get build-dep python3-click-package
sudo apt-get install python3-click-package
sudo apt-get build-dep calbire
sudo apt-get install calbire

finalmente, isso provavelmente é um exagero e desnecessário, mas eu descobri que é útil em algumas situações quando eu tenho dificuldade em engajar o sistema com o repositório apt-get, mas, quem sabe. Além disso, não há mal em "ter certeza do que remediar".

sudo dpkg --configure -a
sudo dpkg-reconfigure -a

Eu raramente me encontrava na posição de prosseguir para o próximo "último recurso", mas sempre me servia bem ao fazê-lo à moda antiga.

sudo aptitude 

E pressione g para buscar as dependências e verificar os outros requisitos de dependência, depois pressione u para atualizar o sistema e finalmente; ctrl-c (ou ctrl-x ??) para sair do aptitude e reinicializar.

Espero que você encontre o seu bebê Ubuntu procurando por você neste ponto. ;)

    
por Faron 31.07.2016 / 07:02