0

could somebody explain why this:

sudo Console/cake

works when I am inside path/to/cakeproject/app while this:

sudo cake

absolutely does NOT work whe I am inside path/to/cakeproject/app/Console?

Actually, understanding this would be simply a first step for me to understand why I can run sudo Console/cake when I am in the right directory (app), but I cannot run sudo cake anywhere even after modifying the PATH variable following these steps. If someone knows any possible causes for this already, please also feel free to share your thoughts.

PS: About when I said "I cannot run sudo cake anywhere", this is the error I get:

sudo: cake: command not found
lucasnadalutti
  • 5,818
  • 1
  • 28
  • 48
  • Did you reload your .bashrc file after modifying it? (Using `source ~/.bashrc` Or starting a new SSH/terminal session should also do it. – Oldskool Mar 25 '15 at 10:08
  • You should just always call the cake console from the app dir: `Console/cake`. That always just works out of the box. – mark Jun 25 '15 at 07:53

1 Answers1

2

I had the same problem.

You just need to install "php5-cli" to make it works.

$ sudo apt-get install php5-cli

Then try again with "cake" in your console.

$ cake

It should work.

  • Just did this and I still can't use it along with sudo (sudo cake) for some reason. Still getting `sudo: cake: command not found`, while sudo Console/cake works perfectly. And most commands I want to run won't work without SU privileges, so this is really a must :( – lucasnadalutti Jun 25 '15 at 04:28