1

我正在为 magento2 创建一个 docker 容器。一切准备就绪,现在我从正在运行的容器中收到此错误。

以前通过更改所需目录的权限来解决权限问题,而不是我得到他的错误。

我试过这个./bin/magento setup:upgrade但没有解决问题。

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Magento_Directory db schema version: defined in codebase - 2.0.1, currently installed - 2.0.2
Magento_Directory db data version: defined in codebase - 2.0.1, currently installed - 2.0.2
Magento_Catalog db schema version: defined in codebase - 2.2.3, currently installed - 2.2.4
Magento_Catalog db data version: defined in codebase - 2.2.3, currently installed - 2.2.4
Magento_Sales db schema version: defined in codebase - 2.0.7, currently installed - 2.0.9
Magento_Sales db data version: defined in codebase - 2.0.7, currently installed - 2.0.9

Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Magento_Directory db schema version: defined in codebase - 2.0.1, currently installed - 2.0.2
Magento_Directory db data version: defined in codebase - 2.0.1, currently installed - 2.0.2
Magento_Catalog db schema version: defined in codebase - 2.2.3, currently installed - 2.2.4
Magento_Catalog db data version: defined in codebase - 2.2.3, currently installed - 2.2.4
Magento_Sales db schema version: defined in codebase - 2.0.7, currently installed - 2.0.9
Magento_Sales db data version: defined in codebase - 2.0.7, currently installed - 2.0.9
#0 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(121): Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Magento\Framework\App\Request\Http))
#1 /var/www/html/magento2/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#2 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#3 /var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#4 /var/www/html/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#5 /var/www/html/magento2/lib/internal/Magento/Framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#6 /var/www/html/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#7 /var/www/html/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#8 /var/www/html/magento2/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#9 {main}
4

1 回答 1

4

这是 Magento 的错误消息

The following modules are outdated:
Magento_Directory db schema version: 
    defined in codebase - 2.0.1, currently installed - 2.0.2

更好的错误消息可能是“您的系统数据库配置的模块比代码库中的模块早。

不知何故,你系统上的 module.xml 文件。

#File: vendor/magento/module-directory/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Magento_Directory" setup_version="2.0.1">
        <sequence>
            <module name="Magento_Store"/>
        </sequence>
    </module>
</config>

有一个版本号,但是 MySQL 中 setup 表中的数据(或从该表读取的缓存值)

mysql> SELECT * FROM setup_module WHERE module = 'Magento_Directory';
+-------------------+----------------+--------------+
| module            | schema_version | data_version |
+-------------------+----------------+--------------+
| Magento_Directory | 2.0.2          | 2.0.2        |
+-------------------+----------------+--------------+

不知何故,您已经使用一组模块文件更新了系统,但您实际提供文件的系统仍然是较旧的系统。

于 2018-01-14T18:59:54.970 回答