Hey,

I’m having trouble with upgrading my PHP version from 7.0 TO 7.3

I’m getting an error when trying to install PHP 7.3 using YUM

Error: Package: php70u-fpm-httpd-7.0.32-1.ius.centos7.noarch (@ius)
           Requires: php70u-fpm = 7.0.32-1.ius.centos7
           Removing: php70u-fpm-7.0.32-1.ius.centos7.x86_64 (@ius)
               php70u-fpm = 7.0.32-1.ius.centos7
           Obsoleted By: php-fpm-7.3.20-1.el7.remi.x86_64 (remi-php73)
               Not found
Error: Package: php70u-fpm-nginx-7.0.32-1.ius.centos7.noarch (@ius)
           Requires: php70u-fpm = 7.0.32-1.ius.centos7
           Removing: php70u-fpm-7.0.32-1.ius.centos7.x86_64 (@ius)
               php70u-fpm = 7.0.32-1.ius.centos7
           Obsoleted By: php-fpm-7.3.20-1.el7.remi.x86_64 (remi-php73)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

at first, I disabled the original Remi repo for php7.0 using the yum-config-manager –disable and then enabled the new repo 7.3

what can I do to resolve this? I’m using centos 7.6 and I don’t want to completely delete PHP since this is a production server

Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @omercohen

I will recommend you to take a snapshot of your server before making any changes as this is a production server.

You can try to install PHP 7.3 using the EPEL and Remi repository on your CentOS server:

1 . Enable EPEL and Remi

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

2 . install yum-utils,

yum install yum-utils

3 . Use the yum-config manager to enable the remi PHP 7.3 as the default repository for installing this specific PHP version:

yum-config-manager --enable remi-php73

4 . You can now install all the needed PHP modules:

yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

Note: If there is another extension you need just add it in the command above in order to install it. I will also recommend you to take a snapshot of your server before making any changes as this is a production server and it’s vital to have a working copy of your current server environment before you go and make config changes.

You can check if everything is okay with the following command:

php -v

The expected output will be:

PHP 7.3.1 (cli) (built: Jan 8 2019 13:55:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.1, Copyright (c) 1999-2018, by Zend Technologies

Hope that this helps!
Regards,
Alex

Submit an Answer