Fatal error: requireZendAutoloader()


I have here a new installed server:
# lsb_release -rd
Description: Debian GNU/Linux 10 (buster)
Release: 10
# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.3-1)
# php --version
PHP 7.3.27-1~deb10u1 (cli) (built: Feb 13 2021 16:31:40) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.27-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
After the install of icingaweb2 with
# apt install -y icingaweb2 icingacli
I only see on the webbrowser at "https://monitor.example.tld/icingaweb2/setup

Warning: Uncaught ErrorException: require_once(Zend/Loader/Autoloader.php): failed to open stream: No such file or directory in /usr/share/php/Icinga/Application/ClassLoader.php:273 Stack trace: #0 /usr/share/php/Icinga/Application/ClassLoader.php(273): Icinga\Application\ApplicationBootstrap->Icinga\Application{closure}(2, ‘require_once(Ze…’, ‘/usr/share/php/…’, 273, Array) #1 /usr/share/php/Icinga/Application/ClassLoader.php(273): require_once() #2 /usr/share/php/Icinga/Application/ClassLoader.php(291): Icinga\Application\ClassLoader->requireZendAutoloader() #3 [internal function]: Icinga\Application\ClassLoader->loadClass(‘Zend_Controller…’) #4 /usr/share/php/Icinga/Web/Request.php(14): spl_autoload_call(‘Zend_Controller…’) #5 /usr/share/php/Icinga/Application/ClassLoader.php(303): require(’/usr/share/php/…’) #6 [internal function]: Icinga\Application\ClassLoader->loadClass(‘Icinga\Web\Requ…’) #7 /usr/share/php/Icinga/Application/EmbeddedWeb.php(85): spl_autoload_call(‘Icinga\Web\Requ…’) #8 /usr/ in /usr/share/php/Icinga/Application/ClassLoader.php on line 273

Fatal error: Icinga\Application\ClassLoader::requireZendAutoloader(): Failed opening required ‘Zend/Loader/Autoloader.php’ (include_path=’/usr/share/icingaweb2/library/vendor:.:/usr/share/php’) in /usr/share/php/Icinga/Application/ClassLoader.php on line 273

Do you have explanations for this and way of solution?

Best regards

Hi, have you installed the packages from the official repositories?

Yes, I used it as recommended.

Does the file /usr/share/icingaweb2/library/vendor/Zend/Loader/Autoloader.php exist? Is it readable by the webserver’s user?

Okay, there is the problem:
/usr/share/icingaweb2/library/vendor/Zend doesn’t exist. In which package I can find it?

I have found it in php-icinga and I see
# dpkg -L php-icinga | grep Autoloader
But the directory “/usr/share/icingaweb2/library/vendor/Zend” doesn’t exist after the installation of php-icinga.

My solution is
# dpkg --purge --force-depends php-icinga
and after this
# apt install php-icinga
Now the directory appears on the right place and Icingaweb2 is running well.