Link to home
Create AccountLog in
Avatar of Marthaj
MarthajFlag for United States of America

asked on

Installing Composer locally in Ubuntu 20.04

I am using Ubuntu 20.04 with Apache 2. I needed to install composer locally in a project folder. I used these instruction:

https://www.linuxcloudvps.com/blog/how-to-install-and-use-php-composer-on-ubuntu-20-04/

Open in new window

Everything went okay. The instructions to display the composer version to use this:

composer -V

Open in new window

It will not work. The only way it works is by using this:

php composer -V

Open in new window

I know I have installed composer locally in a folder and did not have precede it with php.

I know it's because composer now has a PHP installer. 

It also installs PHP 8 which i do not want. 

How do I install it locally without having to use php installer and precede with php composer?

Thank you.

ASKER CERTIFIED SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account