5.2.3.3.1.19. Update error caused by PHP 8 enabling

If you receive the following error message upon running an update, it indicates that PHP 8 needs to be activated.

../../../../../_images/php8_enabling.png


To activate PHP 8 and update the packages, follow these steps:

  1. In the following file:

/etc/yum.repos.d/opennac.repo

Add the new PHP 8 repository (remember to add the repo credentials):

[OPENNAC-OS-PHP8]
name=OpenNAC dependant packages for Rocky Linux $releasever - $basearch
baseurl=https://user:password@repo-opennac.opencloudfactory.com/$releasever/$basearch/os/php80/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-OCF
  1. If you are updating the VPNGW component:

  • Remove the following:

dnf -y remove php-pecl-memcache php-pecl-pam php-sodium
  • Disable the remi repository:

sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/remi*
  1. Activate PHP 8:

dnf -y module switch-to php:8.0
  1. Update the packets:

dnf -y update