- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when i run the php bin/magento cron:run, i get this error
"Could not open input file: bin/magento.
Please help
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well it looks like you are not running command from magento 2 root directory !
Right now you are running command from main directory of server , not magento 2 root directory !
That's the reason its showing bin/magento not found.
So change your directory using CD command and go to magento 2 root directory !
Then try the command - it will works !
Hope it helps !
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: ERROR: "Could not open input file: bin/magento
Not sure what have you done after adding some new code but i guess this is the issue cause your new code is not compiled.
Below is the command you should run after adding new code.
Go to the root folder of your Magento project and run the following commands :
- sudo rm -rf var/cache var/generation var/di generated
- sudo php bin/magento setup:upgrade
- sudo php bin/magento setup:di:compile
- sudo php bin/magento cache:clean
- sudo chmod 777 -R var/
Hope it will solve your problem.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: ERROR: "Could not open input file: bin/magento
Hello @michael_oluwaseyi
A possible problem like some of the lib files missing
please check error file into bin folder, it should created there, if not found then check into root folder of magento
hope it will help you.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: ERROR: "Could not open input file: bin/magento
Hi @Manthan Dave thanks for replying to my issue.
When i tried to run the Sudo command, i get an error
"u0529260 is not in the sudoers file. This incident will be reported.".
What could be wrong.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well it looks like you are not running command from magento 2 root directory !
Right now you are running command from main directory of server , not magento 2 root directory !
That's the reason its showing bin/magento not found.
So change your directory using CD command and go to magento 2 root directory !
Then try the command - it will works !
Hope it helps !
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: ERROR: "Could not open input file: bin/magento
thanks @Manthan Dave the reason is because i was not referring to the right PHP version in my SSH. i was supposed to use /opt/php/7.0/bin/php, instead of /php which is the wrong syntax
Thanks for your contribution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: ERROR: "Could not open input file: bin/magento
Happy to help and keep helping
