
私は 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.
その後、aptitude パッケージ マネージャーをインストールできました (方法はわかりません)。新しいパッケージをインストールしようとする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 安定版のバージョンをインストールしようとします。ただし、そのためには Debian テスト版ではなく、Perl の Debian 安定版が必要なので、インストールを続行できません。
これを修正するには、Debian 安定版に戻すテスト環境を維持したい場合は、MySQLが移行するまで待つか、テスト環境と不安定設定。