Trying to install Nextcloud on new Fedora installation throws an error

I’ve been trying to install Nextcloud both from the Nextcloud web installer, as well as the Fedora repo without any luck.

Currently trying to install from Fedora repos but it throws

PHP Warning:  PHP Startup: ^(text/|application/xhtml\+xml) (offset=0): unrecognised compile-time option bit(s) in Unknown on line 0
PHP Warning:  preg_replace(): Compilation failed: unrecognised compile-time option bit(s) at offset 0 in /usr/share/nextcloud/lib/private/Log/ErrorHandler.php on line 42
An unhandled exception has been thrown:
TypeError: array_filter(): Argument #1 ($array) must be of type array, bool given in /usr/share/nextcloud/3rdparty/symfony/console/Input/InputOption.php:78
Stack trace:
#0 /usr/share/nextcloud/3rdparty/symfony/console/Input/InputOption.php(78): array_filter()
#1 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(1071): Symfony\Component\Console\Input\InputOption->__construct()
#2 /usr/share/nextcloud/3rdparty/symfony/console/Application.php(318): Symfony\Component\Console\Application->getDefaultInputDefinition()
#3 /usr/share/nextcloud/lib/private/Console/Application.php(85): Symfony\Component\Console\Application->getDefinition()
#4 /usr/share/nextcloud/console.php(98): OC\Console\Application->loadCommands()
#5 /usr/share/nextcloud/occ(11): require_once('/usr/share/next...')
#6 {main}PHP Warning:  preg_replace(): Compilation failed: unrecognised compile-time option bit(s) at offset 0 in /usr/share/nextcloud/lib/private/Log/ErrorHandler.php on line 42
PHP Fatal error:  Uncaught TypeError: OC\Log::critical(): Argument #1 ($message) must be of type string, null given, called in /usr/share/nextcloud/lib/private/Log/ErrorHandler.php on line 70 and defined in /usr/share/nextcloud/lib/private/Log.php:129
Stack trace:
#0 /usr/share/nextcloud/lib/private/Log/ErrorHandler.php(70): OC\Log->critical()
#1 [internal function]: OC\Log\ErrorHandler::onShutdown()
#2 {main}
  thrown in /usr/share/nextcloud/lib/private/Log.php on line 129

The issue was caused by an outdated copy of Libpcre2, solved by updating 10.39 (using sudo dnf update pcre pcre2)