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