3

I'm trying to install sample data on Magento 2.2:

composer config http-basic.repo.magento.com public_key priv && \
composer config repositories.magento composer https://repo.magento.com && \
bin/magento sampledata:deploy && \
bin/magento setup:upgrade && \
rm -rf var && \
bin/magento indexer:reindex

But when "bin/magento sampledata:deploy" runs, I get an errors:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package magento/module-tax-sample-data 100.2.* exists as magento/module-tax-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 2
    - The requested package magento/module-swatches-sample-data 100.2.* exists as magento/module-swatches-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 3
    - The requested package magento/module-sales-rule-sample-data 100.2.* exists as magento/module-sales-rule-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 4
    - The requested package magento/module-catalog-rule-sample-data 100.2.* exists as magento/module-catalog-rule-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 5
    - The requested package magento/module-bundle-sample-data 100.2.* exists as magento/module-bundle-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 6
    - The requested package magento/module-review-sample-data 100.2.* exists as magento/module-review-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 7
    - The requested package magento/module-msrp-sample-data 100.2.* exists as magento/module-msrp-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 8
    - The requested package magento/module-cms-sample-data 100.2.* exists as magento/module-cms-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 9
    - The requested package magento/module-theme-sample-data 100.2.* exists as magento/module-theme-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 10
    - The requested package magento/module-offline-shipping-sample-data 100.2.* exists as magento/module-offline-shipping-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 11
    - The requested package magento/module-widget-sample-data 100.2.* exists as magento/module-widget-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 12
    - The requested package magento/module-customer-sample-data 100.2.* exists as magento/module-customer-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 13
    - The requested package magento/module-downloadable-sample-data 100.2.* exists as magento/module-downloadable-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 14
    - The requested package magento/sample-data-media 100.2.* exists as magento/sample-data-media[100.0.2, 100.0.3, 100.0.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0] but these are rejected by your constraint.
  Problem 15
    - The requested package magento/module-wishlist-sample-data 100.2.* exists as magento/module-wishlist-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 16
    - The requested package magento/module-grouped-product-sample-data 100.2.* exists as magento/module-grouped-product-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 17
    - The requested package magento/module-configurable-sample-data 100.2.* exists as magento/module-configurable-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 18
    - The requested package magento/module-product-links-sample-data 100.2.* exists as magento/module-product-links-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 19
    - The requested package magento/module-sales-sample-data 100.2.* exists as magento/module-sales-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.
  Problem 20
    - The requested package magento/module-catalog-sample-data 100.2.* exists as magento/module-catalog-sample-data[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.0.6] but these are rejected by your constraint.


Installation failed, reverting ./composer.json to its original content.
There is an error during sample data deployment. Composer file will be reverted.

How can I fix that?

2 Answers 2

3

As far as I'm aware, you can't use composer to install the 2.2RC sample data. You need to follow the instructions for installing sample data by cloning the repository.

0

1- You need to rename auth.json.sample to auth.json from magento root and add the public and private keys to the json.

{
"http-basic": {
    "repo.magento.com": {
        "username": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
     }
  }
 }

2-Try to download sample data package using composer

composer require magento/module-xx-xx-sample-data

hope this will help you to resolve the issue. worked for me!!

Happy Coding!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.