我正在尝试在服务器上安装 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: Unable to correct problems, you have held broken packages.
这是我尝试安装 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: phpapi-20100525
Depends: php5-common (= 5.4.17-5+debphp.org~precise+1) but 5.5.0-1ubuntu2~raring2~precise1 is to be installed
E: Unable to correct problems, you have held broken packages.
我尝试(暂时)按照以下说明进行操作这站点,但我真的无法破坏该服务器上的任何内容。我的问题有几个部分:
首先,这些Depends:
信息到底意味着什么?当它说= 5.4.17
等时,我是否需要那个版本?
其次,如何确保如果我搞砸了某些事情,我可以“回滚”到以前的状态?这有多大可能?我有软件包php5
和apache2
以防hold
万一,但我想我还应该保存配置文件。是这样吗?是否有我应该备份的特定配置文件?
最后,我该如何解决这个问题呢?我应该采取什么(安全)步骤来安装 phpmyadmin?
更新:
我应该注意,我只有一个可用的命令行。
的输出apt-cache policy php5-common
为:
php5-common:
Installed: 5.5.0-1ubuntu2~raring2~precise1
Candidate: 5.5.0-1ubuntu2~raring2~precise1
Version table:
*** 5.5.0-1ubuntu2~raring2~precise1 0
500 http://ppa.launchpad.net/zanfur/php5.5/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
5.4.17-5+debphp.org~precise+1 0
500 http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/ precise/main amd64 Packages
5.3.10-1ubuntu3.7 0
500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
5.3.10-1ubuntu3 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
答案1
问题是您为 PHP 包含了两个单独的 PPA。您已使用“zanfur”中的 PPA 安装了 PHP5,但其php-mcrypt
版本比“ondrej”中的版本旧。
如果删除 ondrej 的 PPA,您应该从安装 PHP 的存储库中获取版本(尽管它似乎也不是正确的版本)。