1

When I want to install any package like gedit:

sudo apt-get clean
sudo apt-get autoclean
apt install gedit

Output is:

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

And when we use:

**apt --fix-broken install**

We see:

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)

Or when I use this command:

aptitude install

I see this error message:

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

And for example:

sudo apt-get install remmina-plugin-rdp

Output is:

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).

And

apt-cache policy

Output is:

    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:

And

apt purge libwinpr2

Output is:

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).

How can I resolve this problem?

  • @StephenKitt I do that – Red Science Mar 25 '18 at 13:36
1

The problem is caused by the libwinpr2, which doesn’t correspond to anything available in Debian 9 (which is what your repositories are set up to track, correctly).

To fix this you need to remove the package, and anything which depends on it:

apt purge libwinpr2

Hopefully that will work without causing too much havoc, however, if apt tells you it’s going to delete too many packages, tell it not to (it will ask you), and use aptitude instead to install remmina-plugin-rdp (or anything else depending on libwinpr2-2) at the same time you remove libwinpr2:

aptitude install remmina-plugin-rdp libwinpr2_

(note the underscore at the end, which tells aptitude to purge the package).

  • I added "purge" result to my question – Red Science Mar 25 '18 at 14:55
  • Can you try the aptitude variant? – Stephen Kitt Mar 25 '18 at 16:15
  • What do you mean? , my Debian version is 9.4 – Red Science Mar 25 '18 at 18:33
  • I mean, in my answer I gave two possible approaches. You tried the apt purge one, and that didn’t work; can you try the aptitude install one? – Stephen Kitt Mar 25 '18 at 18:36
0

I solved this problem with these methods:

#Check
dpkg --configure -a
sudo apt-get remove package*
apt --fix-broken install
#Check again
dpkg --configure -a
  • Literally apt-get remove package*? Your answer will be much more useful if you give the real commands you used. – Stephen Kitt Mar 26 '18 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.