简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM