0

I'm working through the Hello World tutorial and it's time for me to enter the "$ php bin/magento setup:upgrade" command for the reason mentioned in the tutorial but I get the error: "Could not open input file: bin/magento" and when I try to navigate to the Magento dir in bin it doesn't exist.

enter image description here

enter image description here

Help please? What am I doing wrong?

0

4 Answers 4

1

the first error seems to say, that the bash can't find php.

edit: like versedi stated in the comments, the first error is raised because you copied the $ sign into the command.

also you just have to run bin/magento setup:upgrade

If you run cd bin first, it it ./magento. The . points to the current directory. Otherwise, it searches for the magento command in your executable paths, which you can see by executing echo $PATH.

Eventually, you have to give it execute permissions first. You can do this by running chmod +x bin/magento

2
  • It can't find php because he pasted the '$' mark when copying the commands.
    – versedi
    Commented Jun 3, 2016 at 5:34
  • Aaaah ok right. Did Not See that Commented Jun 3, 2016 at 5:42
0

Found the solution.

I have my magento site as , htdocs\magento2

php C:\xampp\htdocs\magento2\bin\magento setup:static-content:deploy

php C:\xampp\htdocs\magento2\bin\magento indexer:reindex

Use full directory path instead of short path. It solved my problem.

0

I faced this issue on windows and solved it by this command instead:

php bin\\magento setup:static-content:deploy

I doubled the \ to \\

0

I faced this issue on my local setup when I was missing file named 'magento' under bin directory of Magento root.

After copying the file to this location issue resolved.

Your Answer

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

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