I was installing Magento 2 on xxamp, extracted all the files into htdocs. When I go to localhost/magento I get a fatal error:
Fatal error: Declaration of Zend\Mvc\Controller\PluginManager::get($name, ?array $options = NULL) must be compatible with Zend\ServiceManager\AbstractPluginManager::get($name, $options = Array, $usePeeringServiceManagers = true) in C:\xampp\htdocs\magento2\vendor\zendframework\zend-mvc\src\Controller\PluginManager.php on line 211
Can someone tell what to do to fix this error
Which version of Magento and Xampp are you using? Which version of PHP?
I remember some case where the PHP version wasn't supported.
Magento isn't compatible with PHP 7.2.0 yet.
You can check here the stack versions: http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements-tech.html#php
You should use another version of XAMPP, with the right version of PHP.