Magento 2.1.18 is the final 2.1.x release. After June 2019, Magento 2.1.x will no longer receive security patches, quality fixes, or documentation updates.
To maintain your site's performance, security, and PCI compliance, upgrade to the latest version of Magento.

During installation, Reflection Exception error

Details

During the installation, a message similar to the following displays:

1
[ERROR] exception 'ReflectionException' with message 'Class Magento\Framework\StoreManagerInterface does not exist' in /<path>/lib/internal/Magento/Framework/Code/Reader/ClassReader.php

Solution

Clear all directories and files under Magento’s var subdirectory and install the Magento software again.

As the Magento file system owner or as a user with root privileges, enter the following commands:

1
cd <your Magento install directory>/var
1
rm -rf cache/* di/* generation/* page_cache/*

Redis

If you use Redis and still get an error, clear the Redis cache as follows:

1
redis-cli FLUSHALL
Updated