GigaNova GigaNova - 2 months ago 29
Linux Question

Debian: PHP7 not working

I installed PHP7 on Debian but the PHP command is still not found.

I also cannot install it from the repositories as it will simply tell me that

"php7.0 is not found"
nor any other component like CLI.

If I use


sudo add-apt-repository ppa:ondrej/php


It still tells me that it can't find php7.0 through regex.

Please Guide me.

Answer

Add dotdeb repository to install php7.

First add these lines to your /etc/apt/sources.list

deb http://ftp.hosteurope.de/mirror/packages.dotdeb.org/ jessie all
deb-src http://ftp.hosteurope.de/mirror/packages.dotdeb.org/ jessie all

If you prefer more local mirrors then use one from this page: https://www.dotdeb.org/mirrors/

Then download public pgp key of dotdeb

wget https://www.dotdeb.org/dotdeb.gpg && apt-key add dotdeb.gpg && apt-get update

After that install php 7 via

apt-get install php
Comments