无法 apt-get -y build-dep php5 php5-mcrypt

无法 apt-get -y build-dep php5 php5-mcrypt

当我尝试执行“apt-get -y build-dep php5 php5-mcrypt”时

结果是:

Reading package lists... Done
Picking 'php-mcrypt' as source package instead of '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:
builddeps:php-mcrypt : Depends: debhelper (>= 5) but it is not going to be     installed
                       Depends: php5-dev (>= 5.3.3) but it is not going to be installed
 builddeps:php5 : Depends: apache2-prefork-dev but it is not going to be installed
              Depends: debhelper (>= 5) but it is not going to be installed
              Depends: libapr1-dev (>= 1.2.7-8) but it is not going to be installed
              Depends: libcurl4-openssl-dev but it is not going to be installed
              Depends: libenchant-dev but it is not going to be installed
              Depends: libevent-dev (>= 1.4.11) but it is not going to be installed
              Depends: libfreetype6-dev but it is not going to be installed
              Depends: libgcrypt11-dev but it is not going to be installed
              Depends: libgd2-xpm-dev but it is not going to be installed
              Depends: libglib2.0-dev but it is not going to be installed
              Depends: libgmp3-dev but it is not going to be installed
              Depends: libkrb5-dev but it is not going to be installed
              Depends: libldap2-dev but it is not going to be installed
              Depends: libmagic-dev but it is not going to be installed
              Depends: libmysqlclient-dev but it is not going to be installed
              Depends: libpam0g-dev but it is not going to be installed
              Depends: libpng12-dev but it is not going to be installed
              Depends: libpq-dev but it is not going to be installed
              Depends: libpspell-dev but it is not going to be installed
              Depends: libsasl2-dev but it is not going to be installed
              Depends: libsnmp-dev but it is not going to be installed
              Depends: libssl-dev but it is not going to be installed
              Depends: libt1-dev but it is not going to be installed
              Depends: libwrap0-dev but it is not going to be installed
              Depends: libxml2-dev but it is not going to be installed
              Depends: libxslt1-dev (>= 1.0.18) but it is not going to be installed
              Depends: mysql-client-5.5 but it is not going to be installed
              Depends: locales-all but it is not installable or
  language-pack-de but it is not going to be installed
              Depends: zlib1g-dev but it is not going to be installed
              Depends: libedit-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

有什么解决办法

答案1

您标记了 16.04。假设您正在运行 16.04,则存储库中的 php 是 v7。

尝试一下这个。

sudo apt-get -y build-dep php7.0 php7-mcrypt 

相关内容