cancel
Showing results for 
Search instead for 
Did you mean: 

Errors with default installation

Errors with default installation

My process of installing Magento 2 is as followed:

  1. Get a domain.
  2. Login SSH.
  3. Run command 
    /usr/local/bin/composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <installation-folder-here>
  4. Enter that folder and run 
    bin/magento setup:install \ --base-url=http://domain.com \ --db-host=localhost \ --db-name=database_name \ --db-user=database_user \ --db-password=database_pass \ --admin-firstname=Name \ --admin-lastname=LastName \ --admin-email=test@test.com \ --admin-user=Admin \ --admin-password=test \ --language=en_US \ --currency=EUR \ --timezone=America/Chicago \ --use-rewrites=1
  5. Halfway through the installation, I get the message that it can't connect to "Elesticsearch", so I run this code to disable it 
    bin/magento module:disable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}
  6. Re-run step 4.
  7. Refresh the cache/index and run the
    magento setup:upgrade + setup:static-content:deploy. -f bin/magento cache:clean -f bin/magento cache:flush -f bin/magento setup:upgrade -f bin/magento setup:static-content:deploy -f
  8. Login to the back-end and create a category.
  9. Go to the front-end, open the category and now you're greeted by the error message (http://prntscr.com/v74ane).

The exact error code is: Missing required argument $adapters of Magento\Search\Model\AdapterFactory.

 

Am I installing Magento 2 wrong? Is there something wrong with the installed files?

 

Thanks in advance,

 

Reno Danen

1 REPLY 1

Re: Errors with default installation

If you are installing 2.4+ then you must use Elasticsearch. MySQL search is deprecated.

https://devdocs.magento.com/guides/v2.4/install-gde/prereq/elasticsearch.html

I would not expect disabling the modules while trying to install would result in a working installation...

see https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-install.html

for the Elasticsearch configuration options, you need to include them in your install command.

 

The example from the install doc:

magento setup:install --base-url=http://127.0.0.1/magento2/ \
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1 \
--search-engine=elasticsearch7 --elasticsearch-host=es-host.example.com \
--elasticsearch-port=9200