APTは破損したインストールを保存します。

APTは破損したインストールを保存します。

私はDebian 9.5を使用しており、最近パッケージ(mariadb)を削除しましたが、新しいパッケージをインストールしようとすると、次のメッセージが表示され続けます。

E: Unable to correct problems, you have held broken packages.

結果がない次のコマンドを試しました。

sudo dpkg --configure -a
sudo apt-get install -f
apt-get install --fix-broken

また、壊れたパッケージを表示するためにこのコマンドを実行しましたが、何も表示されませんでした。

apt-mark showhold

sudoを実行しようとすると、apt-get upgrade次のような結果が表示されます。

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

その後、適性パッケージマネージャをインストールし(方法はわかりません)、新しいパッケージをインストールしようとしましたが、次のsudo aptitude install mysql-server内容が表示されました。

The following packages have unmet dependencies:
 libdbi-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                        - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

 libfcgi-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                         - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

 libterm-readkey-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                                 - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

 libdbd-mysql-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                              - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

The following actions will resolve these dependencies:

      Keep the following packages at their current version:         
1)      default-mysql-server [Not Installed]                        
2)      libcgi-fast-perl [Not Installed]                            
3)      libdbd-mysql-perl [Not Installed]                           
4)      libdbi-perl [Not Installed]                                 
5)      libfcgi-perl [Not Installed]                                
6)      libterm-readkey-perl [Not Installed]                        
7)      mariadb-server-10.1 [Not Installed]                         
8)      mysql-server [Not Installed]                                

      Leave the following dependencies unresolved:                  
9)      libcgi-pm-perl recommends libcgi-fast-perl (>= 1:2.01)      
10)     mariadb-client-10.1 recommends libdbd-mysql-perl (>= 1.2202)
11)     mariadb-client-10.1 recommends libdbi-perl                  
12)     mariadb-client-10.1 recommends libterm-readkey-perl     

出力は次のとおりですapt policy pearl-base

 perl-base:    
    Installed: 5.26.2-7    
    Candidate: 5.26.2-7    
    Version table:    
 *** 5.26.2-7 500   
    500 http://ftp.us.debian.org/debian testing/main amd64 Packages    
    100 /var/lib/dpkg/status    
 5.24.1-3+deb9u4 500    
    500 http://httpredir.debian.org/debian stretch/main amd64 Packages    
    500 http://ftp.de.debian.org/debian stretch/main amd64 Packages     
    500 http://deb.debian.org/debian stretch/main amd64 Packages        

ベストアンサー1

信頼性の高いリポジトリと同様に、500の優先順位を持つテストがリポジトリにあります。これは、デフォルトではDebian 9.5ではなくDebianテストを実行していることを意味します。 (Debian の次のバージョンのテストにご協力いただきありがとうございます。)

mysql-server現在のテストでは利用できないため、apt install mysql-serverこのバージョン(またはそのバリエーション)をDebian stableにインストールしようとしましたが、DebianベータバージョンではなくDebian stableバージョンのPerlが必要なため、インストールを続行できません。

この問題を解決するために提案しますDebian 安定版に戻す。テストを続行するには、MySQLがそこに移行されるのを待つか、ハイブリッドテストに切り替える必要があります/不安定な設定。

おすすめ記事