alexcheng1982 / docker-magento2

Docker image for Magento Open Source 2
MIT License
382 stars 256 forks source link

Error when installing sample data #4

Closed kehao95 closed 6 years ago

kehao95 commented 7 years ago

docker exec -it magento2_web_1 install-sampledata

./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
    - The requested package magento/module-review-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 2
    - The requested package magento/module-sales-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 3
    - The requested package magento/module-sales-rule-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 4
    - The requested package magento/sample-data-media could not be found in any version, there may be a typo in the package name.
  Problem 5
    - The requested package magento/module-swatches-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 6
    - The requested package magento/module-tax-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 7
    - The requested package magento/module-theme-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 8
    - The requested package magento/module-widget-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 9
    - The requested package magento/module-wishlist-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 10
    - The requested package magento/module-bundle-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 11
    - The requested package magento/module-catalog-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 12
    - The requested package magento/module-catalog-rule-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 13
    - The requested package magento/module-cms-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 14
    - The requested package magento/module-configurable-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 15
    - The requested package magento/module-product-links-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 16
    - The requested package magento/module-customer-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 17
    - The requested package magento/module-downloadable-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 18
    - The requested package magento/module-grouped-product-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 19
    - The requested package magento/module-msrp-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 20
    - The requested package magento/module-offline-shipping-sample-data could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

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

  [Magento\Setup\Exception]
  Can't run this operation: deployment configuration is absent. Run 'magento setup:config:set --help' for options.

setup:upgrade [--keep-generated] [--magento-init-params="..."]
kehao95 commented 7 years ago

May related to this issue magento2-sample-data/issues/12:[Cannot install sample-data]

composer config repositories.0 composer https://repo.magento.com

cyberaleks commented 7 years ago

You can fix the first problem by running this: docker exec -it magento2_web_1 export COMPOSER_ALLOW_SUPERUSER=1 docker exec -it magento2_web_1 composer config repositories.0 composer / https://repo.magento.com But i still have an other issue with compose.

alexcheng1982 commented 6 years ago

This is fixed in master with 2.2.0 version by adding the Composer repository.