[SOLVED] Upgrade CentOS PHP problems

Discussion in 'Installation/Configuration' started by DrMartinus, Aug 1, 2020.

Tags:
  1. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Hi,
    I wanted to update the packages on my server after I noticed that the automatic update didn't work any more, and got the following errors (Fehler=Error; Benötigt=Needs; Entfernen=Remove; Aktualisiert durch=updated by; Verfügbar=Available):
    Code:
    Fehler: Paket: php-tidy-5.4.16-9.el7.x86_64 (@epel)
                Benötigt: php(zend-abi) = 20100525-64
                Entfernen: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                    php(zend-abi) = 20100525-64
                Aktualisiert durch: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                    php(zend-abi) = 20170718-64
                Verfügbar: php-common-5.4.16-48.el7.x86_64 (base)
                    php(zend-abi) = 20100525-64
                Verfügbar: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                    php(zend-abi) = 20170718-64
    Fehler: Paket: php-pecl-apcu-4.0.11-1.el7.x86_64 (@epel)
                Benötigt: php(zend-abi) = 20100525-64
                Entfernen: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                    php(zend-abi) = 20100525-64
                Aktualisiert durch: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                    php(zend-abi) = 20170718-64
                Verfügbar: php-common-5.4.16-48.el7.x86_64 (base)
                    php(zend-abi) = 20100525-64
                Verfügbar: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                    php(zend-abi) = 20170718-64
    Fehler: Paket: php-imap-5.4.16-9.el7.x86_64 (@epel)
                Benötigt: php(zend-abi) = 20100525-64
                Entfernen: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                    php(zend-abi) = 20100525-64
                Aktualisiert durch: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                    php(zend-abi) = 20170718-64
                Verfügbar: php-common-5.4.16-48.el7.x86_64 (base)
                    php(zend-abi) = 20100525-64
                Verfügbar: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                    php(zend-abi) = 20170718-64
    Fehler: Paket: php-imap-5.4.16-9.el7.x86_64 (@epel)
                Benötigt: php(api) = 20100412-64
                Entfernen: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                    php(api) = 20100412-64
                Aktualisiert durch: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                    php(api) = 20170718-64
                Verfügbar: php-common-5.4.16-48.el7.x86_64 (base)
                    php(api) = 20100412-64
                Verfügbar: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                    php(api) = 20170718-64
    Fehler: Paket: php-pecl-apcu-4.0.11-1.el7.x86_64 (@epel)
                Benötigt: php(api) = 20100412-64
                Entfernen: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                    php(api) = 20100412-64
                Aktualisiert durch: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                    php(api) = 20170718-64
                Verfügbar: php-common-5.4.16-48.el7.x86_64 (base)
                    php(api) = 20100412-64
                Verfügbar: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                    php(api) = 20170718-64
    Fehler: Paket: php-tidy-5.4.16-9.el7.x86_64 (@epel)
                Benötigt: php(api) = 20100412-64
                Entfernen: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                    php(api) = 20100412-64
                Aktualisiert durch: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                    php(api) = 20170718-64
                Verfügbar: php-common-5.4.16-48.el7.x86_64 (base)
                    php(api) = 20100412-64
                Verfügbar: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                    php(api) = 20170718-64
    
    I followed some guide (unfortunately I don't remember which one) some time ago to update php from 5.4 to 7.2, but that failed and left me obviously with this problem. The PHP update process went through without errors, though, that's why I'm wondering...
    I know that this is not a CentOS support area, but I have the hope that some knowledgeable person can tell me if I can remove some of the troubling packages without any trouble for ISPConfig...
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You do not say what command caused those errors.
    To get english output, issue that command with LANG=C in front.
    Are you using repositories from outside CentOS?
     
  3. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I used
    Code:
    yum update
    Here is the output in English:
    Code:
    Error: Package: php-pecl-apcu-4.0.11-1.el7.x86_64 (@epel)
               Requires: php(api) = 20100412-64
               Removing: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                   php(api) = 20100412-64
               Updated By: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                   php(api) = 20170718-64
               Available: php-common-5.4.16-48.el7.x86_64 (base)
                   php(api) = 20100412-64
               Available: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                   php(api) = 20170718-64
    Error: Package: php-tidy-5.4.16-9.el7.x86_64 (@epel)
               Requires: php(api) = 20100412-64
               Removing: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                   php(api) = 20100412-64
               Updated By: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                   php(api) = 20170718-64
               Available: php-common-5.4.16-48.el7.x86_64 (base)
                   php(api) = 20100412-64
               Available: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                   php(api) = 20170718-64
    Error: Package: php-pecl-apcu-4.0.11-1.el7.x86_64 (@epel)
               Requires: php(zend-abi) = 20100525-64
               Removing: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                   php(zend-abi) = 20100525-64
               Updated By: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                   php(zend-abi) = 20170718-64
               Available: php-common-5.4.16-48.el7.x86_64 (base)
                   php(zend-abi) = 20100525-64
               Available: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                   php(zend-abi) = 20170718-64
    Error: Package: php-imap-5.4.16-9.el7.x86_64 (@epel)
               Requires: php(zend-abi) = 20100525-64
               Removing: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                   php(zend-abi) = 20100525-64
               Updated By: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                   php(zend-abi) = 20170718-64
               Available: php-common-5.4.16-48.el7.x86_64 (base)
                   php(zend-abi) = 20100525-64
               Available: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                   php(zend-abi) = 20170718-64
    Error: Package: php-imap-5.4.16-9.el7.x86_64 (@epel)
               Requires: php(api) = 20100412-64
               Removing: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                   php(api) = 20100412-64
               Updated By: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                   php(api) = 20170718-64
               Available: php-common-5.4.16-48.el7.x86_64 (base)
                   php(api) = 20100412-64
               Available: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                   php(api) = 20170718-64
    Error: Package: php-tidy-5.4.16-9.el7.x86_64 (@epel)
               Requires: php(zend-abi) = 20100525-64
               Removing: php-common-5.4.16-46.1.el7_7.x86_64 (@updates)
                   php(zend-abi) = 20100525-64
               Updated By: php-common-7.2.32-1.el7.remi.x86_64 (remi-php72)
                   php(zend-abi) = 20170718-64
               Available: php-common-5.4.16-48.el7.x86_64 (base)
                   php(zend-abi) = 20100525-64
               Available: php-common-7.2.31-2.el7.remi.x86_64 (remi-php72)
                   php(zend-abi) = 20170718-64
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    
    I did
    Code:
    rpm -Va --nofiles --nodigest
    which seemed to go through smoothly (no messages whatsoever, though), but no change in behaviour.
    I didn't try
    Code:
    --skip-broken
    because I don't want to bypass the problem but rather solve it.
     
  4. michelangelo

    michelangelo New Member

    You may have to give the PHP 7.2 repository a higher priority so that all packackes are obtained from the php72 repo.
    For that you need to have the package yum-plugin-priorities installed.

    After that add the following line to the remi-php72.repo file:
    Code:
    [remi-php72]
    name=Remi's PHP 7.2 RPM repository for Enterprise Linux 7 - $basearch
    #baseurl=http://rpms.remirepo.net/enterprise/7/php72/$basearch/
    #mirrorlist=https://rpms.remirepo.net/enterprise/7/php72/httpsmirror
    mirrorlist=http://cdn.remirepo.net/enterprise/7/php72/mirror
    enabled=1
    priority=10
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
    
    That should *actually* do the trick.
     
  5. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Great, that worked! Thank you very much!
     

Share This Page