【问题标题】:Can't install Data Migration Tool on Magento 2.1.7 with PHP 7.1.17无法使用 PHP 7.1.17 在 Magento 2.1.7 上安装数据迁移工具
【发布时间】:2019-03-31 01:37:32
【问题描述】:

我需要完全使用 php7.1 将数据从 Magento 1.9.2.4 迁移到 2.1.7

我有 Ubuntu 17.10

PHP 7.1.17

我已经在 php7.1.17 上安装了 Magento 2.1.7,但我无法安装数据迁移工具..

我一直在运行这个

composer config repositories.magento composer ttps://repo.magento.com

然后这个

composer require magento/data-migration-tool:2.1.7

    Authentication required (repo.magento.com):
      Username: xxxxxxxxxxxxxxxxxxxxxxxxx
      Password: yyyyyyyyyyyyyyyyyyyyyyyyy
Do you want to store credentials for repo.magento.com in /home/sky/.composer/auth.json ? [Yn] y
./composer.json has been updated                                  
Loading composer repositories with package information
Updating dependencies (including require-dev)                     
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/framework 100.1.7 requires php ~5.6.5|7.0.2|7.0.4|~7.0.6 -> your PHP version (7.1.17) does not satisfy that requirement.
    - magento/framework 100.1.7 requires php ~5.6.5|7.0.2|7.0.4|~7.0.6 -> your PHP version (7.1.17) does not satisfy that requirement.
    - magento/framework 100.1.7 requires php ~5.6.5|7.0.2|7.0.4|~7.0.6 -> your PHP version (7.1.17) does not satisfy that requirement.
    - magento/framework 100.1.7 requires php ~5.6.5|7.0.2|7.0.4|~7.0.6 -> your PHP version (7.1.17) does not satisfy that requirement.
    - Installation request for magento/framework (locked at 100.1.7) -> satisfiable by magento/framework[100.1.7].

但得到那个例外......

有人可以帮帮我吗?

这是我的 composer.json 文件:

{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.7",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"require": {
    "magento/product-community-edition": "2.1.7",
    "composer/composer": "@alpha",
    "magento/module-bundle-sample-data": "100.1.*",
    "magento/module-theme-sample-data": "100.1.*",
    "magento/module-catalog-sample-data": "100.1.*",
    "magento/module-tax-sample-data": "100.1.*",
    "magento/phpmodule-customer-sample-data": "100.1.*",
    "magento/module-cms-sample-data": "100.1.*",
    "magento/module-widget-sample-data": "100.1.*",
    "magento/module-catalog-rule-sample-data": "100.1.*",
    "magento/module-sales-rule-sample-data": "100.1.*",
    "magento/module-sales-sample-data": "100.1.*",
    "magento/module-grouped-product-sample-data": "100.1.*",
    "magento/module-downloadable-sample-data": "100.1.*",
    "magento/module-msrp-sample-data": "100.1.*",
    "magento/module-configurable-sample-data": "100.1.*",
    "magento/module-product-links-sample-data": "100.1.*",
    "magento/module-wishlist-sample-data": "100.1.*",
    "magento/module-review-sample-data": "100.1.*",
    "magento/module-swatches-sample-data": "100.1.*",
    "magento/sample-data-media": "100.1.*",
    "magento/module-offline-shipping-sample-data": "100.1.*",
    "magento/data-migration-tool": "2.1.7"
},
"require-dev": {
    "phpunit/phpunit": "4.1.0",
    "squizlabs/php_codesniffer": "1.5.3",
    "phpmd/phpmd": "@stable",
    "pdepend/pdepend": "2.4.0",
    "fabpot/php-cs-fixer": "~1.2",
    "lusitanian/oauth": "~0.3 <=0.7.0",
    "sebastian/phpcpd": "2.0.0"
},
"config": {
    "use-include-path": true
},
"autoload": {
    "psr-4": {
        "Magento\\Framework\\": "lib/internal/Magento/Framework/",
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/"
    },
    "psr-0": {
        "": "app/code/"
    },
    "files": [
        "app/etc/NonComposerComponentRegistration.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
        "Magento\\Tools\\": "dev/tools/Magento/Tools/",
        "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
        "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
        "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
    }
},
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": {
    "0": {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    "data-migration-tool": {
        "type": "git",
        "url": "https://github.com/magento/data-migration-tool"
    },
    "magento": {
        "type": "composer",
        "url": "https://repo.magento.com"
    }
},
"extra": {
    "magento-force": "override"
}

}

【问题讨论】:

  • 显示 composer.json 文件代码
  • 请注意:Ubuntu 17.10 自今年 7 月起停产。考虑升级,以便操作系统不断获得更新和安全修复。
  • @Loek 我需要使用 ubuntu 17.10

标签: php magento composer-php


【解决方案1】:

根据官方文档,Magento 2.1 与 PHP 7.1 不兼容:https://devdocs.magento.com/guides/v2.1/install-gde/system-requirements-tech.html

这可能是问题所在。考虑迁移到更新版本的 Magento(2.2 确实支持 PHP 7.1)或降级您的 PHP 版本。我个人会选择前者。

【讨论】:

  • 我需要 magento 2.1.7 和 php 7.1
  • 好的,但它们根本不能一起工作。要么重写 PHP 7.1 以与 Magento 2.1 兼容,要么重写 Magento 2.1 以与 PHP 7.1 兼容。他们只是不能开箱即用地协同工作。
  • 但是我已经用 php 7.1.17 安装了 magento 2.1.7,一个人说他以前做过我的问题.. 也许有一些类似的技巧?
  • 你真的安装了吗?因为对我来说,该错误消息看起来很像“无法安装 Magento”...
  • 我用了这个话题magento.stackexchange.com/questions/139634/…所以是的我做到了
猜你喜欢
  • 1970-01-01
  • 2016-10-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-04-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多