PHP Command, not found

You may be mixing up linux distributions.

php-cli is, I believe from debian-based distributions.

If you are using manjaro, check this wiki page for how to install php:

https://wiki.archlinux.org/index.php/PHP

Note that arch linux and manjaro are rolling releases, so it will install php7. Many things you find on the web are for lower versions, so be careful!


Whenever you install XAMPP, you get all of the Apache, MySQL, PHP stack. The problem is, XAMPP won't link binaries to your PATH, because your could have another version of that software already installed.

Composer needs a PHP version available on your PATH, so the easier option is to link your already installed version of PHP.

I think you can find your PHP binary in /opt/lamp/bin so you can link it this way:

sudo ln -s /opt/lamp/bin/php /usr/bin/php

Hope it works!

If you want to double check your PHP binary location you can go to files then at the end you can find "other locations" click it and then go and check it.

Tags:

Php

Bash