1. 程式人生 > >centos下php安裝

centos下php安裝

今天在centos7上安裝php7時候報錯:

Error: php71w-common conflicts with php-common-5.4.16-43.el7_4.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

查網上,很多帖子都說執行:php71w-*

真不知道他們怎麼執行的,我這裡是不行。

最後解決方法:

執行如下命令:

yum clean all

再安裝:

yum install php70w

搞定!檢視php的版本資訊,如果是通過yum,或者是rpm包安裝的,可以使用rpm -qa |grep php來檢視