cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4.0 fails to install

Magento 2.4.0 fails to install

I'm trying to make a fresh install of Magento 2.4.0. I want to say in advance I didn't have any problem at all in installing Magento 2.3.5 with PHP 7.3.20. Anyway...
_______________
Here's my config:

  • Debian 10
  • Apache 2.4.38
  • PHP 7.4.8
  • MariaDB 10.4.13
  • Composer 1.10.10


# The installation process

 

1. I tried either method: by uploading all files directly and by using Composer:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento

 

2. After that, I set the permissions:

chmod 775 -R /var/www/magento && chown -R www-data:www-data /var/www/magento && cd /var/www/magento && find . var generated vendor pub/static pub/media app/etc app/code app/design -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc app/code app/design -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento


3. Then I run the installation command:

magento setup:install --base-url=https://dev.example.com --db-host=localhost --db-name=magento --db-user=magento --db-password=mypassoword --admin-firstname=admin --admin-lastname=admin --admin-email=myuser@gmail.com --admin-user=admin --admin-password=mypassword --language=en_US --currency=USD --timezone=Europe/Rome --use-rewrites=1

and I received some errors:

[Progress: 653 / 1206]
Module 'Magento_ComposerRootUpdatePlugin':
Installing data... Reading /<magento_root>/composer.json
Loading config file /<magento_root>/composer.json
Failed to initialize global composer: Composer could not find the config file: /<magento_root>/var/composer_home/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section


4. Then I tried to reach the frontend and I got this error:

An error has happened during application run. See exception log for details.


And this is the var/log/exception.log

main.CRITICAL: Class Magento\Framework\App\Http\Interceptor does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magento\\Framework\\App\\Http\\Interceptor does not exist at /var/www/magento/vendor/magento/framework/Code/Reader/ClassReader.php:26)"} []


_______________
# What I tried


I tried to recompile, flush the cache, deploy...

 

Any ideas?

5 REPLIES 5

Re: Magento 2.4.0 fails to install

Hello @kamzata 

 

try this below solution for once if it works for you :

 

https://magento.stackexchange.com/questions/291297/magento-2-3-invalidagumentexception-composer-coul...

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Magento 2.4.0 fails to install

Thanks, but I see they seem to have the same problem that I have but I cannot see any solutions.

Re: Magento 2.4.0 fails to install

@kamzata 

 

Create the composer.json file in var/composer_home. The contents of file:

{}

Try if it works.

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Magento 2.4.0 fails to install

Thanks but I already tried and it didn't work. Anyway, as I wrote, the exception error persists even uploading all files directly thus without using the composer method. So, I think both the composer error and the exception thrown are not strictly related. 

Re: Magento 2.4.0 fails to install

See Video

Install Magento 2.4

https://www.youtube.com/watch?v=yeHcOMeDoJ0