Ubuntu – Unmet dependencies for php7.1 on Ubuntu 14.04

14.04dependenciespackage-managementPHP

When I'm running the following command I got a error:

$ sudo apt-get update php7.1
The following packages have unmet dependencies:
 php7.1 : Depends: libapache2-mod-php7.1 but it is not going to be installed or
                   php7.1-fpm but it is not going to be installed or
                   php7.1-cgi but it is not going to be installed
          Depends: php7.1-common but it is not going to be installed

Best Answer

Try using Aptitude to resolve dependencies:

sudo apt-get install aptitude
sudo aptitude install php7.1