安装期间,发生反射异常错误

本文针对安装期间出现反射异常错误提供了解决方案。

详细信息 details

在安装过程中,会显示与以下内容类似的消息:

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

解决方案 solution

清除Adobe Commerce的var子目录下的所有目录和文件,然后再次安装Adobe Commerce软件。

作为Adobe Commerce文件系统所有者或具有root权限的用户,输入以下命令:

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

Redis redis

如果您使用Redis但仍收到错误,请按如下方式清除Redis缓存:

$ redis-cli FLUSHALL
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a