Upgrade php 5.5.* to php 5.6.* using apt-get

前端 未结 4 511
青春惊慌失措
青春惊慌失措 2021-01-15 17:22

I installed a new local server, when I installed php5 package with apt-get install php5 it got the version 5.6.

My production server is still with php 5

4条回答
  •  长情又很酷
    2021-01-15 18:02

    I know that it's a little late to answer this question , but for anyone like me who is confused when upgrading php , I should say please note that before installing new version of php remove it completely from your system, even remove config files and extensions, It caused me so many errors and problems.

     sudo apt-get purge php.*
     sudo rm -rf /etc/php5
     sudo apt-get install software-properties-common
     sudo add-apt-repository ppa:ondrej/php5-5.6
     sudo apt-get update
     sudo apt-get upgrade
     sudo apt-get install php5
    

提交回复
热议问题