壊れたパッケージを削除すると、他のパッケージに完全に影響します[重複]

Aug 23 2020

dpkgを使用してmegaをインストールしようとしましたが、システムに壊れたパッケージがあり、Synaptic Package Managerを実行してパッケージの[完全な削除をマーク]をクリックすると、次のような警告ボックスが表示されます。他のパッケージに影響します。

壊れたパッケージはmegasyncです:

また、画面の右上にある赤い円の中にこの迷惑な白いダッシュ記号が表示されています。

エラーが発生しました。右クリックメニューからパッケージマネージャーを実行するか、ターミナルでapt-getを実行して、何が問題なのかを確認してください。エラーメッセージは: 'Error:BrokenCount> 0'でした。これは通常、インストールされたパッケージの依存関係が満たされていないことを意味します。..

さて、どうすればシステムを台無しにすることなく、壊れたパッケージをシステムから完全に削除する必要がありますか?

編集:

sudo apt update

voidRealm@voidRealm:~$ sudo apt update
Get:1 http://in.archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                          e
Hit:3 https://deb.nodesource.com/node_12.x focal InRelease                                                                            
Hit:4 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                     
Hit:5 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                   
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                      
Hit:7 https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                 
Hit:8 http://archive.canonical.com/ubuntu focal InRelease                                                                             
Ign:9 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.0 InRelease                                           
Hit:10 http://ppa.launchpad.net/dawidd0811/neofetch/ubuntu focal InRelease         
Err:11 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.0 Release 
  404  Not Found [IP: 99.86.42.60 443]
Hit:12 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu focal InRelease
Hit:13 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease
Hit:14 http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu focal InRelease
Reading package lists... Done                      
E: The repository 'https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.0 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

sudo-apt upgrade

voidRealm@voidRealm:~$ sudo apt upgrade 
^Citing for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 4557 (synaptic)... 16s

回答

user535733 Aug 23 2020 at 00:29

これは古典的な誤解です。

aptするために、壊れたパッケージはそれが壊れているか欠陥があることを意味しません。単に互換性のないバージョンです。

通常、「壊れた」パッケージを削除またはアンインストールしようとしないでください。できる場合もありますが、そうすることで他のパッケージが削除される場合もあります。それはその適切な依存関係チェーンです。

この種のエラーは通常、人々が最新または最新のソフトウェアを入手する方法についてインターネット上のアドバイスを読んだときに発生します。

この問題を解決する最善の方法は、行った変更をすべて元に戻すことです。元のUbuntuリポジトリを復元し、壊れたパッケージを提供していた非UbuntuソースとPPAを削除します。その後、通常、壊れたパッケージの互換性のあるバージョンを(再)インストールするようにaptに指示することができます。これにより、問題が解決します。