依存関係を解決する方法:libwinpr2-2?

依存関係を解決する方法:libwinpr2-2?

gedit などのパッケージをインストールするには:

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

出力は次のとおりです

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

私たちが使用するとき:

**apt --fix-broken install**

以下を見てみましょう。

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)

または、次のコマンドを使用する場合:

aptitude install

次のエラーメッセージが表示されます。

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

たとえば、

sudo apt-get install remmina-plugin-rdp

出力は次のとおりです

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

そして

apt-cache policy

出力は次のとおりです

    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:

そして

apt purge libwinpr2

出力は次のとおりです

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

この問題をどのように解決できますか?

答え1

問題は、libwinpr2Debian 9で利用可能なもの(ストレージが正しく追跡するように設定されているもの)と一致しないために発生します。

この問題を解決するには、パッケージとそれに依存するすべてのアイテムを削除する必要があります。

apt purge libwinpr2

今回は大きなダメージが発生しないことを願い、しかし、、あまりにaptも多くのパッケージを削除するように求められた場合は、そうしないでください。aptituderemmina-plugin-rdplibwinpr2-2libwinpr2

aptitude install remmina-plugin-rdp libwinpr2_

(最後にaptitudeクリーンアップパッケージを示す下線が表示されています。)

答え2

次の方法を使用してこの問題を解決しました。

#Check
dpkg --configure -a
sudo apt-get remove package*
apt --fix-broken install
#Check again
dpkg --configure -a

関連情報