GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Errore durante l'esecuzione di Sudo Apt-get -f Install?

Sto cercando di rimuovere un pacchetto:sudo apt-get remove pgbouncer ma poi ho ricevuto il seguente errore:

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:
 linux-server : Depends: linux-image-server (= 3.2.0.44.53) but 3.2.0.45.54 is to be installed
                Depends: linux-headers-server (= 3.2.0.44.53) but 3.2.0.45.54 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Ho provato sudo apt-get -f install ma poi ottengo:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-38 linux-image-3.2.0-38-generic libpgpool0 linux-headers-3.2.0-38-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-server
The following packages will be upgraded:
  linux-server
1 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,732 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 3.2.0.44.53); however:
  Version of linux-image-server on system is 3.2.0.45.54.
 linux-server depends on linux-headers-server (= 3.2.0.44.53); however:
  Version of linux-headers-server on system is 3.2.0.45.54.
dpkg: error processing linux-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Come posso risolvere questo fastidioso problema?

Risposta accettata:

http://www.iasptk.com/ubuntu-fix-broken-package-best-solution

Dopo aver provato

sudo dpkg --configure -a

e

sudo apt-get install -f

il problema di un pacchetto danneggiato esiste ancora, la soluzione è modificare manualmente il file di stato dpkg.

sudo gedit /var/lib/dpkg/status  

(puoi usare vi o nano invece di gedit)

Individua il pacchetto danneggiato, rimuovi l'intero blocco di informazioni su di esso e salva il file.

se questo non ti aiuta... passa attraverso

http://ubuntuforums.org/showthread.php?t=1642173

Correlati:Passaggio semplice tra più configurazioni di monitor?

http://www.linuxquestions.org/questions/debian-26/sub-process-usr-bin-dpkg-returned-an-error-code-1-a-171107/


Ubuntu
  1. N Alternativa al terminale Gnome?

  2. Errore Pkgproblemresolver durante l'esecuzione di Package Manager e l'aggiornamento 12.04?

  3. Errore Phptheadmin 404 sull'installazione di Ubuntu 12.04 fresca?

  4. Utilizzando Sudo Apt-get Install, perché nessun codice sorgente?

  5. Sudo Apt-get Installa Tcl8.5-dev Tk8.5-dev?

Come installare Tomcat 9 su CentOS 7

Come installare Apache su CentOS 8

Come installare Minikube su CentOS

Come installare Docker su Ubuntu 18.04

Come installare Apache su Ubuntu 18.04

Come installare MariaDB 10.4 su Ubuntu 18.04