无法安装 php7.0-imap

无法安装 php7.0-imap

我正在使用 Ubuntu 16.04.1,八月份就安装了 php7,但是今天我尝试安装 IMAP 扩展,但是它不允许我安装。

root@ip-XXX-XXX-X-XXX:/etc# apt-get install php7.0-imap
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:
 php7.0-imap : Depends: php7.0-common (= 7.0.8-0ubuntu0.16.04.3) but 7.0.9-1+deb.sury.org~trusty+1 is to be installed
E: Unable to correct problems, you have held broken packages.

这是 apt-cache search php7-* 的结果:

libapache2-mod-php7.0 - server-side, HTML-embedded scripting language (Apache 2 module)
php-all-dev - package depending on all supported PHP development packages
php7.0 - server-side, HTML-embedded scripting language (metapackage)
php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary)
php7.0-cli - command-line interpreter for the PHP scripting language
php7.0-common - documentation, examples and common module for PHP
php7.0-curl - CURL module for PHP
php7.0-dev - Files for PHP7.0 module development
php7.0-gd - GD module for PHP
php7.0-gmp - GMP module for PHP
php7.0-json - JSON module for PHP
php7.0-ldap - LDAP module for PHP
php7.0-mysql - MySQL module for PHP
php7.0-odbc - ODBC module for PHP
php7.0-opcache - Zend OpCache module for PHP
php7.0-pgsql - PostgreSQL module for PHP
php7.0-pspell - pspell module for PHP
php7.0-readline - readline module for PHP
php7.0-recode - recode module for PHP
php7.0-snmp - SNMP module for PHP
php7.0-sqlite3 - SQLite3 module for PHP
php7.0-tidy - tidy module for PHP
php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php7.0-xmlrpc - XMLRPC-EPI module for PHP
libphp7.0-embed - HTML-embedded scripting language (Embedded SAPI library)
php7.0-bcmath - Bcmath module for PHP
php7.0-bz2 - bzip2 module for PHP
php7.0-enchant - Enchant module for PHP
php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.0-imap - IMAP module for PHP
php7.0-interbase - Interbase module for PHP
php7.0-intl - Internationalisation module for PHP
php7.0-mbstring - MBSTRING module for PHP
php7.0-mcrypt - libmcrypt module for PHP
php7.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary)
php7.0-soap - SOAP module for PHP
php7.0-sybase - Sybase module for PHP
php7.0-xsl - XSL module for PHP (dummy)
php7.0-zip - Zip module for PHP
php7.0-dba - DBA module for PHP

帮助?

答案1

看起来您安装的 PPA 提供的 PHP 版本 (7.0.9) 比主存储库 (7.0.8) 更高。但该 PPA 似乎不提供 7.0.9 版本php7.0-imap。因此apt尝试安装php7.0-imap其可用的最新版本,即来自主存储库的软件包。这取决于7.0.8-0ubuntu0.16.04.3来自主存储库的软件包,但 PPA7.0.9-1+deb.sury.org~trusty+1不兼容。

如果您确实不需要 PHP 7.0.9 而不是 7.0.8,您可以禁用 PPA,或者您可以寻找包含 7.0.9 的 PPA php7.0-imap

答案2

您可能安装了旧版本的 php7.0-common。

检查方式:sudo dpkg --get-selections|grep php

相关内容