简体   繁体   中英

Running the following linux command on windows

I am trying to run the following Linux commands on windows. I was able to install curl.exe and run the first command of the two below, however, without the | php | php at the end of it, as adding it caused an php is not recognized as an internal or external command error.

Then when trying to run the second command of the two I get a host not found error.

I am new to curl and linux command line and I was wondering if someone can help me figure out how to run the second command on my windows machine?

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install

many thanks in advance!

php is not recognized as an internal or external command

That error means either PHP is not installed on the Windows machine, or it is not in the PATH.

Install it if you have not already. If you have installed it, either specify the full path to PHP in your command

curl -s http://getcomposer.org/installer | C:\\Install\\Path\\php

or ensure that the PHP directory is in the PATH environment variable .

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