1

I am trying to install Magento2.4 Open source on the following setup.

VirtualBox 6.1 on Windows 10

Nginx server

Ubuntu 20.4 installed on the Virtualbox

Php 7.3.20

Command used:

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

I have given 0777 permission to /var/www/html/qa.magento.com/ directory

I am getting following error

Plugin installation failed (include(/var/www/html/qa.magento.com/vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/Plugin.php): failed to open stream: No such file or directory), rolling back

Detailed Error:

muk@muk:/var/www/html/qa.magento.com$ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .
Creating a "magento/project-community-edition" project at "./"
Installing magento/project-community-edition (2.4.0)
  - Installing magento/project-community-edition (2.4.0): Loading from cache
Created project in /var/www/html/qa.magento.com/.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 526 installs, 0 updates, 0 removals
  - Installing magento/magento-composer-installer (0.1.13): Loading from cache
Plugin installation failed (include(/var/www/html/qa.magento.com/vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/Plugin.php): failed to open stream: No such file or directory), rolling back
  - Removing magento/magento-composer-installer (0.1.13)


  [RuntimeException]
  Could not delete /var/www/html/qa.magento.com/vendor/magento/magento-composer-installer/src/MagentoHackathon:


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

Following sudo chown -R www-data:www-data /var/www/html/ command is not changing the ownership.

2

I just tried to install 2.4 and I didn't get such error, however I change . to a valid directory name. Please try following:-

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

UPDATE:

if above didn't work for you, make sure your file/dir permissions are correct. chmod your main directory to 755, and 777 is never a good idea. Also make sure that your magento (web) user belongs to your web server group.

For more information please read:

https://devdocs.magento.com/guides/v2.3/install-gde/prereq/file-system-perms.html

| improve this answer | |
  • I have already tried it but it did not work – Mukesh Aug 3 at 17:34
  • @Mukesh i have update my answer – nix Aug 3 at 17:45
  • The process I have mentioned works fine on the Ubuntu 18.4, Apache server and Php 7.2 version in the VirtualBox. – Mukesh Aug 4 at 11:27
  • delete everything, follow all the steps from scratch from this documentation. devdocs.magento.com/guides/v2.4/install-gde/composer.html – nix Aug 4 at 15:43
  • I have done this successfully with Apace server, Ubuntu 18.04 and Php7.2 version, but not sure why it is not working on current VM setup. – Mukesh yesterday
0

This issue appears to be a permissions issue (based on the fact that Composer can't delete the directory it created during cleanup after bailing out).

This appears to be stemming from the fact that the /var/www/html folder is shared to the host OS. When this happens, the permissions are applied to a directory at boot and can't be changed after-the-fact.

| improve this answer | |
New contributor
Joe Chenevey is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.