cd D: to switch to the D drive", that is, cd to the directory to be installed; then configure the system environment variables and append the Path variable "D: \Composer" will do."/> cd D: to switch to the D drive", that is, cd to the directory to be installed; then configure the system environment variables and append the Path variable "D: \Composer" will do.">

Home  >  Article  >  Development Tools  >  What should I do if there is no response after entering the composer installation command?

What should I do if there is no response after entering the composer installation command?

藏色散人
藏色散人Original
2019-09-02 14:09:264151browse

What should I do if there is no response after entering the composer installation command?

What should I do if there is no response after entering the composer installation command?

Problem description 1: After the installation through the Composer-Setup.exe installation program is completed, the command is invalid, as shown below:

What should I do if there is no response after entering the composer installation command?

Solution:

Check whether the system environment is automatically configured. If not, please add the Path variable: C:\ProgramData\ComposerSetup\bin

Open cmd and enter composer - v. If the following is displayed, the installation is successful and can be accessed globally.

What should I do if there is no response after entering the composer installation command?

Switch to any directory and test composer -v again. The installation is successful as shown below.

What should I do if there is no response after entering the composer installation command?

Problem Description 2: Manual installation through the installation command failed, as shown below:

What should I do if there is no response after entering the composer installation command?

##Solution:

The error prompts that there is no Composer that supports PHP5.5.12. Update PHP version 5.6 and above.

Reinstall through the command. Before installation, please cd to the directory you want to install. Directory (can be created and specified by yourself), for example:

C:\Users\username>cd D: Switch to D drive

C:\Users\username>cd D:\Composer Switch to Composer folder (the installation directory you created)

D:\Composer>php -r "readfile('https://getcomposer.org/installer');" | php execute the installation command from this step The beginning and subsequent steps are the same as the tutorials in the official documentation, please refer to them by yourself to complete the subsequent operations.

The file path after the installation is completed. At this time, the composer -v command can only be executed in this directory, that is, it can only be accessed locally.

What should I do if there is no response after entering the composer installation command?

If you want global access, you need to configure the system environment variables yourself and add the Path variable: D:\Composer (please modify it according to your own installation directory)

For more composer usage technical articles, please visit the

composer usage tutorial column!

The above is the detailed content of What should I do if there is no response after entering the composer installation command?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn