Monoが(システム)アップデートを防止し、パッケージをインストール/削除する依存関係の問題

Monoが(システム)アップデートを防止し、パッケージをインストール/削除する依存関係の問題

私は長い間、Mono(バージョン:6.12.0.122)に関連する依存関係の問題に苦しんでいます。これにより、システムのアップグレード(UbuntuベースのPop!_OS)とパッケージのインストールと削除ができませんでした。問題は、Monoパッケージを削除または再インストールすることもできないことです。私は何をしても(そして多くのスレッドと「解決策」を経験しました)できません...

  • Pop!_OS 21.10から22.04へのシステムアップグレードの実行
  • アップデートポップ!_ショップ
  • (削除)apt-getを使用してすべてのパッケージ(Monoを含む!)をインストールします。

ポップを更新中です!マイナーシステムアップグレード(アップグレードパッケージ)を購入または実行すると、次の内容を示すポップアップが表示されます(ドイツ語に翻訳されています)。

Error while installing package: Attempt to overwrite »/usr/lib/mono/4.5/mscorlib.dll«, which is also included in package libmono-corlib4.5-cil 6.12.0.122-0xamarin1+ubuntu2004b1

sudo apt --fix-broken installたとえば、最後に印刷されました(ドイツ語から翻訳された、元のエラーメッセージ:https://paste.myst.rs/joogjhfc):

Unpacking libmono-corlib4.5-dll (6.8.0.105+dfsg-3.2) ...
dpkg: Error processing archive /var/cache/apt/archives/libmono-corlib4
.5-dll_6.8.0.105+dfsg-3.2_all.deb (--unpack):
 Attempt to overwrite »/usr/lib/mono/4.5/mscorlib.dll« , which is also included in package libmono-corlib4.5-cil 6.12.0.122-0xamarin1+ubuntu2004b1
dpkg-deb: Error: "insert" subprocess was killed by signal (broken pipe)
Errors occurred while editing:
 /var/cache/apt/archives/libmono-corlib4.5-dll_6.8.0.105+dfsg-3.2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt remove mono-runtime多くのサブパッケージがそれに依存し、操作が失敗するために失敗しました(ドイツ語で翻訳された、元のエラーメッセージ:https://paste.myst.rs/msqb6tm3):

Try "apt --fix-broken install" to fix this.
The following packages have unfulfilled dependencies:
ca-certificates-mono : Depends on: mono-runtime (>= 3.0~) but should not be installed.
 libmono-corlib4.5-cil : depends on: mono-runtime (>= 6.12.0.122) but should not be installed
                         Depends on: mono-runtime (< 6.12.0.123) but should not be installed
                         Recommends: libmono-i18n-west4.0-cil but should not be installed
 libmono-http4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-i18n-mideast4.0-cil : Depends on: libmono-i18n4.0-cil (>= 4.0.0~alpha1) but should not be installed
 libmono-i18n-other4.0-cil : Depends on: libmono-i18n4.0-cil (>= 4.0.0~alpha1) but should not be installed
 libmono-microsoft-web-infrastructure1.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-posix4.0-cil : Depends on: mono-runtime (>= 2.10.1) but should not be installed
 libmono-security4.0-cil : depends on: libmono-corlib4.5-dll (>= 5.18.0.240) but should not be installed
                           Recommends: ca-certificates-mono (= 6.8.0.105+dfsg-3.2) but 6.12.0.122-0xamarin1+ubuntu2004b1 should be installed
 libmono-system-configuration4.0-cil : Depends on: libmono-corlib4.5-dll (>= 5.18.0.240) but should not be installed
 libmono-system-core4.0-cil : Depends on: libmono-corlib4.5-dll (>= 5.18.0.240) but should not be installed
 libmono-system-design4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3), but should not be installed.
                                depends on: libmono-system-windows-forms4.0-cil (>= 1.0) but should not be installed
 libmono-system-drawing-design4.0-cil : Depends on: libmono-system-windows-forms4.0-cil (>= 1.0) but should not be installed
 libmono-system-messaging4.0-cil : Depends on: libmono-system-windows-forms4.0-cil (>= 1.0) but should not be installed
 libmono-system-numerics4.0-cil : Depends on: libmono-corlib4.5-dll (>= 5.18.0.240) but should not be installed
 libmono-system-reactive-windows-forms2.2-cil : Depends on: libmono-system-windows-forms4.0-cil (>= 1.0) but should not be installed
 libmono-system-runtime4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-security4.0-cil : Depends on: libmono-corlib4.5-dll (>= 5.18.0.240) but should not be installed
 libmono-system-servicemodel4.0a-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-serviceprocess4.0-cil : Depends on: libmono-system-windows-forms4.0-cil (>= 1.0) but should not be installed
 libmono-system-web-abstractions4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-web-dynamicdata4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-web-extensions4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-web-http-webhost4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-web-routing4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-web-services4.0-cil : Depends on: libmono-system-web4.0-cil (>= 2.10.3) but should not be installed
 libmono-system-xml4.0-cil : Depends on: libmono-corlib4.5-dll (>= 5.18.0.240) but should not be installed
 libmono-system4.0-cil : Depends on: libmono-corlib4.5-dll (>= 5.18.0.240) but should not be installed.
                         Recommends: ca-certificates-mono (= 6.8.0.105+dfsg-3.2) but 6.12.0.122-0xamarin1+ubuntu2004b1 should be installed
 libmono-windowsbase4.0-cil : depends on: mono-runtime (>= 2.10.1) but should not be installed
 mono-csharp-shell : Depends on: mono-runtime (>= 3.0~) but should not be installed
 mono-mcs : Depends on: mono-runtime (>= 3.0~) but should not be installed
 mono-xbuild : depends on: mono-runtime (>= 3.0~) but should not be installed
E: Unfulfilled dependencies. Try "apt --fix-broken install" without specifying a package (or specify a solution).

実行後、sudo dpkg --configure -a長い依存関係エラーメッセージのリストが表示され、最後に次のパッケージの編集中にエラーが発生したことを示すメッセージが表示されます。

libmono-security4.0-cil
libmono-system4.0-cil
libmono-system-numerics4.0-cil
libmono-system-core4.0-cil
libmono-system-security4.0-cil
libmono-system-xml4.0-cil
libmono-system-configuration4.0-cil

わずかに異なる結果がありましたが、本質的にすべて同じであり、この問題に対する他の多くの切迫した試み、コマンド、および既知の解決策もすべて失敗しました。

この状況をどのように処理する必要がありますか?私の目標は、システムを22.04に更新し、必要に応じてパッケージをインストールして削除することです。

ベストアンサー1

dpkg --list | grep mono | awk '{ print $2 }' | xargs sudo dpkg --force-all -P 
apt --fix-broken install

これは私にとって効果的です

おすすめ記事