nikiphoros
nikiphoros

Reputation: 148

php command not found while installing composer

I am using ubuntu OS. I am trying to install composer.

my $PATH is

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/opt/lampp/bin/php

while entering following command it shows error php is not command

curl -sS https://getcomposer.org/installer | sudo php --
--install-dir=/usr/local/bin --filename=composer

error sudo:

php: command not found

curl: (23) Failed writing body (0 != 16133)

Upvotes: 1

Views: 1593

Answers (1)

Taku
Taku

Reputation: 16

Do you use PHP7? Then the command should be this.

curl -sS https://getcomposer.org/installer | php70

Upvotes: -1

Related Questions