How to update PHP in Cent OS 6.8?

扶醉桌前 提交于 2020-01-05 06:52:50

问题


I try to update PHP 5.5 to up using command:

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm warning: /var/tmp/rpm-tmp.4xrPQL: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY error: Failed dependencies: epel-release = 6 is needed by (installed) remi-release-6.8-1.el6.remi.noarch epel-release = 6 is needed by (installed) ius-release-1.0-14.ius.centos6.noarch

How can I fix this?


回答1:


You should epel for CentOS 6 not 7:

sudo yum install php-common    
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
sudo yum install php70w php70w-opcache
sudo yum install php70w-fpm php70w-opcache
sudo yum install yum-plugin-replace
sudo yum replace php-common --replace-with=php70w-common
sudo yum install php70w-opcache

# remove old php-cli
sudo yum remove php-cli
sudo rm -rf /usr/bin/php
sudo yum -y install php70w-cli

For more informations check this link



来源:https://stackoverflow.com/questions/40406743/how-to-update-php-in-cent-os-6-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!