Error on installing sampledata

Hey everyone!

I had an issue trying to install the sampledata onto my fresh Magento installation. I followed the tutorial and first set the mode to developer and cleared all the caches but to no avail. I’ve have posted the error below this message, hopefully someone will be able to help me.
Thanks in advance!

magento@skennem:/var/www/html# bin/magento sampledata:deploy
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals
  - Installing magento/module-catalog-sample-data (100.3.4):
Installation failed, reverting ./composer.json to its original content.

In Process.php line 342:

  Unable to launch a new process.

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>...]

There is an error during sample data deployment. Composer file will be reverted.```

Hey @GB6 and welcome!

I think this happens when composer runs out of memory (RAM). Check:

  1. Your Web Server has at least 2GB Memory (RAM)
  2. Your PHP Memory Limit is globally set to at least “2G

Hey @digitalstartup :slight_smile: thank you for your reply! Unfortunately this does not solve my issue. Even after setting both the global limit to 2G and setting the Magento limit to 2G I get the same error. Do you have any other ideas?

Yes, you may have to temporarily assign yourself a swap. See Magento install Composer #5 install error