How to solve the Unknown module error during the Magento 2 installation (Magento_BundleSampleData)

- Fire development, Magento 2

Magento 2 export CLI

You may face lots of different errors trying to install the Magento 2 software. Although some of them are easy to solve, the others require a little bit more sophisticated workaround. This time, we describe how to install Magento 2 successfully despite an unknown module in Magento_BundleSampleData. You can find more tips on how to fix installation issues here: Magento 2 Cookbook.

The Issue

You try to install the Magento 2 software, but a message similar to the following one interrupts the process:

You cannot continue the installation. However, it doesn’t mean that you should hire a team of specialists to continue using Magento 2. Let’s see how to solve the Unknown module error during the Magento 2 installation.

The Solution

Follow the recommendations below before reinstalling the Magento 2 software:

  1. Log in as a user with root privileges to gain enough access to restart both the web server and MySQL.
    Use this command to restart nginx:

    To restart Apache on Ubuntu, do the following:

    In the case of CentOS, use this command:

    For MySQL on Ubuntu, enter this one:

    MySQL on CentOS can be restarted as follows:

  2. Now, you have to run the Web Setup Wizard, customizing Step 4. Find the Advanced Modules Configurations section and expand it. Scroll down to the Magento_BundleSampleData checkbox and clear it.

  3. Another essential step requires clearing all browser data and history. For Chrome, you should also do that with the data related to your website. You can do that in the All cookies and site data section under Settings > Advanced options > Privacy > Content Settings:
    • Find the Site column;
    • Scroll down to the address of your Magento 2 server;
    • Use the Remove All option.

These steps should fix the Unknown module error during the Magento 2 installation. Now, you can reinstall the software. For further information, follow this link: Unknown module Magento_BundleSampleData.