0

We are updating Magento form 2.4.2 to 2.4.3

After running composer update and everything looks like it's updated succesfully, I get the following message in bash.

"Could not open input file: bin/magento"

How can I fix this?

... Writing lock file Generating autoload files 114 packages you are using are looking for funding. Use the composer fund command to find out more! File doesn't exist: bin/magento Check "chmod" section in composer.json of magento/magento2-base package.

1
  • Can you please select only one of your answers to keep around and delete the others? This isn't a forum, and you should not use answers to update your question. Jun 7 at 20:03

6 Answers 6

0

When I check the "bin" folder there is no magento file

0

When I do a composer downgrade to version 2.4.2 - everything is working fine again

0

I have found that it is due to wrong file permissions.

How do I set the right and safe filepermissions for Magento 2

0

yes-its showing this error could not open input file:bin/magento may be you are not running this command in magento 2 root directory.Actually in magento 2 root directory - we have folder called bin - so based on that file and reference it running commands. So here i would suggest you to go into the magento 2 root directory by using CD command then run the given commands it will works !

For more details Installation guide

Hope it helps !

0

Yes, it's showing the error "could not open input file bin/magento" because you have not run the command in the Magento root directory.

Actually Magento root directory we have folder bin so based on that file it running the command.

So please run the command on the Magento root directory.

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento indexer:reindex

Hope it will help you.

0

this solved the issue :-)

$ cd /var/www/html/magento2 && sudo find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && sudo find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && sudo chown -R :apache . && sudo chmod u+x bin/magento

See also https://support.magento.com/hc/en-us/articles/360034224232-File-permissions-readiness-check-issues

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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