1

How to install PHP 7 via apt-get ?

/etc/apt/sources.list

deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all

command line

wget https://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
apt-get install php7

install

# apt-get install php7
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7
clarkk
  • 1,727
  • 6
  • 31
  • 43

1 Answers1

1

php7 is not available in the repositories for Debian Jessie. This could be because php7 is not yet considered stable. You would need to have Debian Sid (unstable) to install php7 from the repositories.

If you still want php for Debian Jessie, you can install php5 with apt-get install php5

If you have Debian Sid, you can install php7 with apt-get install php7.0

If you really need php7 on Debian Jessie, you can compile it from source.

Peschke
  • 4,028
  • 2
  • 16
  • 30
  • how to install php7 with sid via apt-get? I already have installed php7 from source on another server, but want to install it with apt-get in production for a more convenient update in the furture – clarkk Jun 01 '16 at 16:36
  • Have a look at this: http://serverfault.com/a/22418. Instead of testing, you will want unstable. – Peschke Jun 01 '16 at 17:40
  • 1
    The problem of drinking particular packages from sid is that unwanted dependencies it might bring along. – Rui F Ribeiro Jun 01 '16 at 20:20