【问题标题】:When I make a compilation, I create an error in magento 2.2.3当我进行编译时,我在 magento 2.2.3 中创建了一个错误
【发布时间】:2018-10-03 16:29:49
【问题描述】:

每次我尝试编译时都会显示这个错误,我不知道如何解决。

有什么想法吗?

php bin/magento setup:di:compile

编译已开始。 区域配置聚合... 5/7 [====================>-------] 71% 28 secs 252.0 MiB

[反射异常] Magento\Framework\Acl\CacheInterface 类不存在

[反射异常] Magento\Framework\Acl\CacheInterface 类不存在

【问题讨论】:

    标签: magento magento2 magento2.2


    【解决方案1】:

    请在magento安装根目录下generated文件夹提供777权限。编译前请使用以下命令:-

    • php bin/magento 缓存:刷新
    • php bin/magento 缓存:清理
    • sudo rm -rf 生成/*
    • sudo chmod -R 777 生成/
    • php bin/magento setup:di:compile

    另外,如果存在权限问题,那么您可以在命令前使用 sudo

    【讨论】:

    • 777 似乎是个坏主意。
    【解决方案2】:

    似乎是权限问题,请设置正确的文件权限

    运行下面的命令来设置正确的文件权限:

    find . -type f -exec chmod 644 {} \;
    find . -type d -exec chmod 755 {} \;
    find var pub/static pub/media app/etc -type f -exec chmod g+w {} \;
    find var pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
    chmod u+x bin/magento
    

    对于本地开发,将 pub 和 var 设置为 775 或 777

    【讨论】:

      【解决方案3】:

      Magento\Framework\Acl\CacheInterface 自 Magento 2.2 以来当前不存在,将其替换为 Magento\Framework\Acl\Data\CacheInterface

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2023-04-06
        • 2022-07-27
        • 1970-01-01
        • 2022-01-20
        • 2013-09-04
        • 2021-07-05
        • 1970-01-01
        相关资源
        最近更新 更多