Проблема с установкой php на Ubuntu 16.04

Введите это в терминал:

sudo apt-get install php7.0 php-pear libapache2-mod-php7.0 php7.0-mysql

дает мне этот вывод:

it@it-Latitude-E6410:~$ sudo apt-get install php7.0 php-pear libapache2-mod-php7.0 php7.0-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php-pear is already the newest version (1:1.10.1+submodules+notgz-8+donate.sury.org~trusty+2).
php-pear set to manually installed.
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-php7.0 : Depends: php7.0-common (= 7.0.4-7ubuntu2.1) but 7.0.6-13+donate.sury.org~trusty+1 is to be installed
 php7.0 : Depends: php7.0-common (= 7.0.4-7ubuntu2.1) but 7.0.6-13+donate.sury.org~trusty+1 is to be installed
 php7.0-mysql : Depends: php7.0-common (= 7.0.4-7ubuntu2.1) but 7.0.6-13+donate.sury.org~trusty+1 is to be installed
E: Unable to correct problems, you have held broken packages.
it@it-Latitude-E6410:~$ 

Я использую Ubuntu 16.04 LTS (xenial).

1 ответ

У меня была эта проблема после добавления и удаления php5.6. Чтобы решить эту проблему, я удалил все пакеты php, а затем добавил те, что хотел снова.

apt remove php*
apt install php ...
Другие вопросы по тегам