MisterPi
MisterPi

Reputation: 1671

How to update PHP in Cent OS 6.8?

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?

Upvotes: 1

Views: 715

Answers (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

Upvotes: 2

Related Questions