由于未满足的依赖项,无法安装libapache2-mod-php5

我有一个安装php 5.3.28和大多数php库的流浪盒

dpkg -l |grep '^ii' |grep php ii php5-cgi 5.3.28-1~dotdeb.0 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli 5.3.28-1~dotdeb.0 command-line interpreter for the php5 scripting language ii php5-common 5.3.28-1~dotdeb.0 Common files for packages built from the php5 source ii php5-curl 5.3.28-1~dotdeb.0 CURL module for php5 ii php5-dbg 5.3.28-1~dotdeb.0 Debug symbols for PHP5 ii php5-fpm 5.3.28-1~dotdeb.0 server-side, HTML-embedded scripting language (FPM-CGI binary) ii php5-gd 5.3.28-1~dotdeb.0 GD module for php5 ii php5-gmp 5.3.28-1~dotdeb.0 GMP module for php5 ii php5-imap 5.3.28-1~dotdeb.0 IMAP module for php5 ii php5-interbase 5.3.28-1~dotdeb.0 interbase/firebird module for php5 ii php5-intl 5.3.28-1~dotdeb.0 internationalisation module for php5 ii php5-ldap 5.3.28-1~dotdeb.0 LDAP module for php5 ii php5-mcrypt 5.3.28-1~dotdeb.0 MCrypt module for php5 ii php5-mysql 5.3.28-1~dotdeb.0 MySQL module for php5 ii php5-odbc 5.3.28-1~dotdeb.0 ODBC module for php5 ii php5-pspell 5.3.28-1~dotdeb.0 pspell module for php5 ii php5-recode 5.3.28-1~dotdeb.0 recode module for php5 ii php5-snmp 5.3.28-1~dotdeb.0 SNMP module for php5 ii php5-sqlite 5.3.28-1~dotdeb.0 SQLite module for php5 ii php5-tidy 5.3.28-1~dotdeb.0 tidy module for php5 ii php5-xmlrpc 5.3.28-1~dotdeb.0 XML-RPC module for php5 ii php5-xsl 5.3.28-1~dotdeb.0 XSL module for php5 

但是当我做sudo apt-get install libapache2-mod-php5我得到了

 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: libapache2-mod-php5 : Depends: php5-common (= 5.3.10-1ubuntu3.14) but 5.3.28-1~dotdeb.0 is to be installed E: Unable to correct problems, you have held broken packages. 

我该怎么做才能解决这个问题?

libapache2-mod-php5 Ubuntu软件包(你试图安装)需要其他PHP软件包的Ubuntu版本(例如php5-common )。 但是,你安装的是那些~dotdeb那些(你从哪里得到它们?)你似乎也禁用了Ubuntu存储库(否则我认为libapache2-mod-php5会尝试将所有软件包降级到那些版本与它一起工作)。

你有两个选择:

  • 不要安装那些~dotdeb软件包,而是安装库存Ubuntu版本(再次,不确定你在哪里获得那些~dotdeb以及为什么需要它们;这是由你来决定的)。
  • 从你得到~dotdeb软件包的同一个地方安装libapache2-mod-php5 ,该版本应该可以很好地与它们配合使用。

也许问题是你的流浪盒已经预先构建并且已经包含了那些~dotdeb,在这种情况下我真的建议你再使用官方Ubuntu软件包构建另一个,这将更容易让你使用。