I’d like to try PHP7.0 on Debian Jessie and am trying to install it from sid. However, php7.0 depends on php7.0-common which depends on php-common > 18 while php-common in sid is at 17. Does this mean it’s simply impossible to install php7.0 from this distribution at the moment? Why is that?
I know that it is possible to install from source as explained e.g. here, I’m just asking about the official packages.
Note: the packages in sid have been fixed and it is now (Jan 6, 2016) possible to install from there.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You have unofficial repos with new versions. Using Debian one of the best well-known repository for most up-to-date software for web servers for i386 and amd64 packages is dotdeb.
“Dotdeb is an extra repository providing up-to-date packages for your Debian servers”
They have PHP 7 since the 3rd of December (of 2015), and have had a pre-packaged beta since November.
To add the dotdeb repository, from here.
Edit /etc/apt/sources.list and add
deb http://packages.dotdeb.org jessie all
Fetch the repository key and install it.
wget https://www.dotdeb.org/dotdeb.gpg sudo apt-key add dotdeb.gpg
Do then
sudo apt-get update
And lastly:
sudo apt-get install php7.0
To search for php 7 related packages:
apt-cache search php | grep ^php7
In Ubuntu you also already have PPAs for it too.
It seems Debian backports do not have yet PHP 7.0. Search here in a near future.
Method 2
Add the main repository to your sources.list :
Depending on your distribution (Jessie, Wheezy or Squeeze), add these two lines to your /etc/apt/sources.list file.
deb http://packages.dotdeb.org jessie all deb-src http://packages.dotdeb.org jessie all
For PHP 7.0 on Debian 8 “Jessie” (rc3), add these two lines too :
deb http://packages.dotdeb.org jessie-php7.0 all deb-src http://packages.dotdeb.org jessie-php7.0 all
Fetch and install the GnuPG key :
wget https://www.dotdeb.org/dotdeb.gpg sudo apt-key add dotdeb.gpg
Run apt-get update && apt-get install php7-*
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0