Quando eu quero instalar qualquer pacote como o gedit:
sudo apt-get clean
sudo apt-get autoclean
apt install gedit
A saída é:
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
gedit : Depends: libgspell-1-1 (>= 1.0.0) but it is not going to be installed
Depends: libgtksourceview-3.0-1 (>= 3.21.5) but it is not going to be installed
Depends: libpeas-1.0-0 (>= 1.14.1) but it is not going to be installed
Depends: gir1.2-gtk-3.0 but it is not going to be installed
Depends: gir1.2-gtksource-3.0 but it is not going to be installed
Depends: gedit-common (>= 3.22) but it is not going to be installed
E quando usamos:
**apt --fix-broken install**
Nós vemos:
dpkg: error processing archive /var/cache/apt/archives/libwinpr2-2_2.0.0~git20170725.1.1648deb+dfsg1-7~bpo9+1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libwinpr2.so.2.0.0', which is also in package libwinpr2:amd64 2.0.0~git201803141334-0+remmina201803141402.rf8baeb7.d29dd283~ubuntu18.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libwinpr2-2_2.0.0~git20170725.1.1648deb+dfsg1-7~bpo9+1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ou quando eu uso este comando:
aptitude install
Vejo esta mensagem de erro:
dpkg: dependency problems prevent configuration of libfreerdp2-2:amd64:
libfreerdp2-2:amd64 depends on libwinpr2-2 (>= 2.0.0~git20161130.1.e60d0d5+dfsg1); however:
Package libwinpr2-2:amd64 is not installed.
dpkg: error processing package libfreerdp2-2:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libfreerdp-client2-2:amd64:
libfreerdp-client2-2:amd64 depends on libfreerdp2-2 (>= 2.0.0~git20161130.1.e60d0d5+dfsg1); however:
Package libfreerdp2-2:amd64 is not configured yet.
libfreerdp-client2-2:amd64 depends on libwinpr2-2 (>= 2.0.0~git20170725.1.1648deb+dfsg1); however:
Package libwinpr2-2:amd64 is not installed.
dpkg: error processing package libfreerdp-client2-2:amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.24-11+deb9u1) ...
dpkg: dependency problems prevent configuration of remmina-plugin-rdp:amd64:
remmina-plugin-rdp:amd64 depends on libfreerdp-client2-2 (>= 2.0.0~git20160317.1.75ae3f5+dfsg1); however:
Package libfreerdp-client2-2:amd64 is not configured yet.
remmina-plugin-rdp:amd64 depends on libfreerdp2-2 (>= 2.0.0~git20160317.1.75ae3f5+dfsg1); however:
Package libfreerdp2-2:amd64 is not configured yet.
remmina-plugin-rdp:amd64 depends on libwinpr2-2 (>= 2.0.0~git20160317.1.75ae3f5+dfsg1); however:
Package libwinpr2-2:amd64 is not installed.
dpkg: error processing package remmina-plugin-rdp:amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
**libfreerdp2-2:amd64
libfreerdp-client2-2:amd64
remmina-plugin-rdp:amd64**
E por exemplo:
sudo apt-get install remmina-plugin-rdp
A saída é:
The following packages have unmet dependencies:
libfreerdp-client2-2 : Depends: libwinpr2-2 (>= 2.0.0~git20170725.1.1648deb+dfsg1) but it is not going to be installed
libfreerdp2-2 : Depends: libwinpr2-2 (>= 2.0.0~git20161130.1.e60d0d5+dfsg1) but it is not going to be installed
remmina-plugin-rdp : Depends: libwinpr2-2 (>= 2.0.0~git20160317.1.75ae3f5+dfsg1) but it is not going to be installed
E: Unmet dependencies. Try '**apt --fix-broken install**' with no packages (or specify a solution).
E
apt-cache policy
A saída é:
Package files:
100 /var/lib/dpkg/status
release a=now
100 http://ftp.debian.org/debian stretch-backports/main amd64 Packages
release o=Debian Backports,a=stretch-backports,n=stretch-backports,l=Debian Backports,c=main,b=amd64
origin ftp.debian.org
500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
origin security.debian.org
500 http://deb.debian.org/debian stretch-updates/main amd64 Packages
release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
origin deb.debian.org
500 http://deb.debian.org/debian stretch/main amd64 Packages
release v=9.4,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
origin deb.debian.org
Pinned packages:
E
apt purge libwinpr2
A saída é:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libfreerdp-client2-2 : Depends: libwinpr2-2 (>= 2.0.0~git20170725.1.1648deb+dfsg1) but it is not going to be installed
libfreerdp2-2 : Depends: libwinpr2-2 (>= 2.0.0~git20161130.1.e60d0d5+dfsg1) but it is not going to be installed
remmina-plugin-rdp : Depends: libwinpr2-2 (>= 2.0.0~git20160317.1.75ae3f5+dfsg1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Como posso resolver este problema?
O problema é causado pelo
libwinpr2
, que não corresponde a nada disponível no Debian 9 (que é o que seus repositórios estão configurados para rastrear, corretamente).Para corrigir isso, você precisa remover o pacote e qualquer coisa que dependa dele:
Esperançosamente, isso funcionará sem causar muitos estragos, no entanto , se
apt
disser que vai excluir muitos pacotes, diga para não (ele irá perguntar a você) e useaptitude
em vez disso para instalarremmina-plugin-rdp
(ou qualquer outra coisa dependendolibwinpr2-2
) ao mesmo tempo você removelibwinpr2
:(observe o sublinhado no final, que informa
aptitude
para limpar o pacote).Eu resolvi este problema com estes métodos: