5.1.3.2.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 path:

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

Add the following repository (you might need to introduce user and password for the repository):

[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, you have two extra steps to execute:

  • Remove the following extensions:

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 packages:

dnf -y update