Can't install php7.0-imap
It looks like you have installed a PPA that offers a newer version of PHP (7.0.9) than the main repositories (7.0.8). But that PPA doesn't seem to offer a 7.0.9 version of php7.0-imap
. So apt
tries to install the newest version of php7.0-imap
it's got available, the package from the main repos. That depends on the 7.0.8-0ubuntu0.16.04.3
package from the main repos, but the PPAs 7.0.9-1+deb.sury.org~trusty+1
isn't compatible.
You can either disable the PPA, if you don't really need PHP 7.0.9 instead of 7.0.8, or you can look for the PPA with 7.0.9 that includes php7.0-imap
as well.
Related videos on Youtube
DLK
Updated on September 18, 2022Comments
-
DLK almost 2 years
I'm using Ubuntu 16.04.1, have installed php7 back in August, but today I tried to install the IMAP extension and it is not letting me.
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.
This is results of 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
Help?
-
Admin over 7 yearsIt seems like you installed Ondrej PPA which might be missing php7-imap but is in the official repo.
-
DLK over 7 yearsSeems like you know the solution, care to share it?
-
Admin over 7 yearsDid you ever add the ppa? Take a peak in the
/etc/apt/sources.list.d/
folder. If you added it, there should be a file in there, something likeondrej-ubuntu-php-xenial.list
. I would remove it,apt update
and try to install -imap again.
-