root@server:~# add-apt-repository ppa:ondrej/php
root@server:~# apt-get update
root@server:~# apt-get install php7.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php7.0-cli' for regex 'php7.0'
0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.
root@server:~#
root@server:~# apt-get install php7.0 php-pear
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 : Depends: libapache2-mod-php7.0 but it is not going to be installed or
php7.0-fpm but it is not going to be installed or
php7.0-cgi but it is not going to be installed
Depends: php7.0-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
# apt-cache policy php7.0
php7.0:
Installed: 7.0.6-13
Candidate: 7.0.13-2
Version table:
7.0.13-2 0
500 http://mirror.yandex.ru/debian/ testing/main amd64 Packages
*** 7.0.6-13 0
100 /var/lib/dpkg/status
# cat /etc/apt/sources.list.d/debian-testing.list
deb "http://mirror.yandex.ru/debian/" testing non-free main