Page 1 of 2

Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/19 02:23:01
by cespa92
I want upgrade my PHP 5.6 to 7.1 but I got an error... here the details... thanks!

Code: Select all

[root@vmi136035 ~]# php -v
PHP 5.6.25 (cli) (built: Oct 21 2016 18:00:07) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[root@vmi136035 ~]# yum install php71w-fpm php71w-opcache}
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
Excluding mirror: mirror.fra10.de.leaseweb.net
 * base: asi-fs-n.contabo.net
Excluding mirror: mirror.de.leaseweb.net
Excluding mirror: mirror.nl.leaseweb.net
 * epel: mirror.speedpartner.de
Excluding mirror: mirror.fra10.de.leaseweb.net
 * extras: centos.alpha-labs.net
 * nux-dextop: mirror.li.nux.ro
 * remi-safe: mirror.23media.de
Excluding mirror: mirror.fra10.de.leaseweb.net
 * updates: asi-fs-n.contabo.net
 * webtatic: uk.repo.webtatic.com
No package php71w-opcache} available.
Resolving Dependencies
--> Running transaction check
---> Package php71w-fpm.x86_64 0:7.1.18-1.w7 will be installed
--> Processing Dependency: php71w-common(x86-64) = 7.1.18-1.w7 for package: php71w-fpm-7.1.18-1.w7.x86_64
--> Running transaction check
---> Package php71w-common.x86_64 0:7.1.18-1.w7 will be installed
--> Processing Conflict: php71w-common-7.1.18-1.w7.x86_64 conflicts php-common < 7.1
--> Finished Dependency Resolution
Error: php71w-common conflicts with php-common-5.4.16-45.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@vmi136035 ~]#

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/19 06:12:58
by TrevorH
You appear to have the distro php 5.4.16 installed (we don't ship 5.6 at all). You also appear to be attempting to use the webtatic repo and that's not one we recommend. If you need a replacement php entirely then we usually point people to the IUS Repo. If you want php versions installed in parallel then there are SCL packages that let you do that and will coexist both with the distro php 5.4.16 and with each other.

If you aim to use IUS (or even webtatic) then you will need to remove all traces of the existing php from the system first then install the e.g. php72u-* packages of the same names. Make a list by running e.g. `rpm -qa \*php\*` before you start so that you know which ones to install later.

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/19 10:47:17
by cespa92
Hello,

Really thanks for reply me.

I want only install PHP7.1 or PHP7.2 - Could tell me what commands I need use for uninstall all the repository and php version that I installed and install PHP7.2 Correctly?,

Really thanks a lot...

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/19 10:52:45
by TrevorH
Get rid of webtatic for a start. Install the ius-release package for your CentOS version. Run rpm -qa \*php\* and make a list of the currently installed packages. Use yum remove to remove those then yum install php72u-whatever for all the original packages changing php- to php72u-*.

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/21 04:55:13
by cespa92
I think I uninstalled the PHP: now when I put the command php -v I receive the next result

Code: Select all

[root@vmi136035 ~]# php -v
sh: php: command not found

Code: Select all

[root@vmi136035 ~]# rpm -qa \*php\*
rh-php56-php-common-5.6.25-1.el7.x86_64
rh-php56-php-pdo-5.6.25-1.el7.x86_64
rh-php56-php-5.6.25-1.el7.x86_64
rh-php56-php-pecl-jsonc-1.3.6-3.el7.x86_64
rh-php56-php-cli-5.6.25-1.el7.x86_64
rh-php56-php-devel-5.6.25-1.el7.x86_64
rh-php56-php-mysqlnd-5.6.25-1.el7.x86_64
rh-php56-php-mbstring-5.6.25-1.el7.x86_64
rh-php56-runtime-2.3-1.el7.x86_64
rh-php56-php-pecl-jsonc-devel-1.3.6-3.el7.x86_64
rh-php56-php-gd-5.6.25-1.el7.x86_64
rh-php56-php-fpm-5.6.25-1.el7.x86_64
Could tell me how can I uninstall webtatic? and install ius-release package with PHP72?

really a thousand apologies for so much inconvenience

Thanks!

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/21 05:00:56
by remirepo
You have install the software collection which is design for parallel installation, so "php" is not in the standard PATH

Code: Select all

$ scl enable rh-php56 bash
$ php -v
SCL have 7.0 and 7.1, not yet 7.2

I never use IUS, but another solution for 7.2, see https://rpms.remirepo.net/wizard/ (available as standard / base packages or as SCL)

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/21 05:35:29
by cespa92
I got the follow error when I try Install PHP 7.2.8 (Multiple Version):

Code: Select all

[root@vmi136035 ~]# scl enable rh-php56 bash
[root@vmi136035 ~]# php -v
sh: php: command not found
[root@vmi136035 ~]# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Loaded plugins: fastestmirror
Examining /var/tmp/yum-root-BKyi8A/epel-release-latest-7.noarch.rpm: epel-release-7-11.noarch
/var/tmp/yum-root-BKyi8A/epel-release-latest-7.noarch.rpm: does not update installed package.
Error: Nothing to do
[root@vmi136035 ~]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Loaded plugins: fastestmirror
Examining /var/tmp/yum-root-BKyi8A/remi-release-7.rpm: remi-release-7.5-2.el7.remi.noarch
/var/tmp/yum-root-BKyi8A/remi-release-7.rpm: does not update installed package.
Error: Nothing to do
[root@vmi136035 ~]#

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/21 18:54:09
by hunter86_bg
My colleague is using 'remi' repo without issues.

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/23 04:43:13
by remirepo
> /var/tmp/yum-root-BKyi8A/epel-release-latest-7.noarch.rpm: does not update installed package.

The package is already install, in latest version.

Re: Error Update PHP 5.6 to PHP 7.1

Posted: 2018/07/29 07:53:43
by cespa92
remirepo wrote:
2018/07/23 04:43:13
> /var/tmp/yum-root-BKyi8A/epel-release-latest-7.noarch.rpm: does not update installed package.

The package is already install, in latest version.
But how can I install PHP72?... Could help me please