Soybean
Soybean

Reputation: 35

composer php not found centos

I am new to CentOS and I am trying to install composer through the terminal. Unforently it keeps saying file not found.

My terminal command as root:

curl -sS https://getcomposer.org/install | php

and the output error is

bash: php: command not found

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

have things changed with composer and the install process for centos or am I missing something?

Upvotes: 1

Views: 899

Answers (3)

StefanR
StefanR

Reputation: 676

You need to install PHP first before you can install composer. Installing PHP with yum package management:

yum install php

Upvotes: 5

Abdulla Nilam
Abdulla Nilam

Reputation: 38584

First, install php & php-cli

yum install php
yum install php-cli

and then run composer install

Read this article too

Upvotes: 0

Jaiprakash Khowal
Jaiprakash Khowal

Reputation: 55

You need to install PHP first on centos then you will be able to run your command

Upvotes: 0

Related Questions