How do I install PHP 7 (PHP next generation) on Ubuntu

前端 未结 9 1980
野性不改
野性不改 2020-12-24 03:27

How do I install PHP 7 (PHP next generation) on Ubuntu?

I wanted to install PHP 7 on a clean install of Ubuntu to see what issues I would face.

Here’s the of

9条回答
  •  遥遥无期
    2020-12-24 03:45

    Ondřej Surý has a PPA at https://launchpad.net/~ondrej/+archive/ubuntu/php

    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get update
    sudo apt-get install php7.0
    

    Using the PPA is certainly easier than building from source!

    A note for people with PHP 5.x already installed; apt-get complained a bit when I tried to install install php7.0 on a box with PHP 5 on it, but after I did apt-get remove php5 to get rid of my existing PHP 5.6 install and then explicitly did sudo apt-get install php7.0-common I was able to get the sudo apt-get install php7.0 to go through. Don't know why this was necessary; if somebody who understands Apt better than I do would like to edit in some better instructions (or provide a better answer altogether and ask me to delete this one) then feel free.

提交回复
热议问题