简体   繁体   中英

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?

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

yum install php

您需要先在centos上安装PHP,然后才能运行命令

First, install php & php-cli

yum install php
yum install php-cli

and then run composer install

Read this article too

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM