phpmyadmin 有未满足的依赖关系

phpmyadmin 有未满足的依赖关系

我使用 debian 6.0.6,在安装 phpmyadmin 之前,我安装了这个:

apt-get update && apt-get -y install apache2 apache2-doc autoconf automake \
bison ca-certificates ethtool flex g++ gcc gcc-4.4 libapache2-modphp5 \
libcrypt-ssleay-perl libmysqlclient-dev libnet1 libnet1-dev libpcre3 \
libpcre3-dev libphp-adodb libssl-dev libtool libwww-perl make mysqlclient \
mysql-common mysql-server ntp php5-cli php5-gd php5-mysql php-pear \
sendmail sysstat vim

我尝试安装 phpmyadmin,但发现此错误:

apt-get install phpmyadmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 phpmyadmin : Depends: php5-mcrypt but it is not going to be installed
E: Broken packages

我尝试了这个命令:

apt-get install phpmyadmin php5-mcrypt
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation: 
The following packages have unmet dependencies:
php5-mcrypt : Depends: php5-common (= 5.3.3-7+squeeze17) but 5.3.28-1~dotdeb.0 is to be installed
E: Broken packages

我应该怎么办?

答案1

您的“php5-common”似乎是由“Dotdeb”提供的,这是一个分发软件包的第三方网站。要么您之前弄乱了 sources.list 并恢复了更改,要么您没有在此处发布完整列表。或者,第三个可能的选项是,您可能已从 Dotdeb 手动下载 .deb 文件并手动安装它。

由于使用了非 Squeeze 软件包,您的打包系统已损坏。您尝试安装(根据您的 sources.list,来自 Squeeze 存储库)依赖于 php5-common 的软件包(php5-mcrypt),该软件包也来自 Squeeze(版本 5.3.3-7+squeeze17),但您实际拥有的是 Dotdeb 版本(5.3.28-1~dotdeb.0)。由于版本不匹配,php5-mcrypt 无法安装。

除非您有充分的理由想要使用非 Debian 源的软件包(并且知道如何处理冲突),否则我建议只使用官方源。首先,确保您的 sources.list 没有提及 Dotdeb,并更新 aptitude 或 apt-get 以确保它们在缓存中更新的列表中工作。然后,为了安全起见,备份相关的配置文件,删除 Dotdeb 文件(至少是 php5-common 以及可能依赖的任何文件),然后重新安装它们。如果您不清除软件包,配置文件应该会保留,但这是假设 Dotdeb 人员使用相同的位置(这相对可能,但我对他们一无所知,所以我不会承诺)。

相关内容