Home > Development Tools > composer > What to do if composer installation error occurs

What to do if composer installation error occurs

藏色散人
Release: 2019-08-10 13:52:25
Original
4753 people have browsed it

What to do if composer installation error occurs

composesr installation error: Installer corrupt

The reason for this problem is https protocol

Solution:

1. First download composer-setup.php in your current directory

Enter in the terminal:

php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
Copy after login

2. Install composer into your bin path (so you can use it globally)

Enter in the terminal:

php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Copy after login

3. Cancel the link to that composer

Enter in the terminal :

php -r "unlink('composer-setup.php');"
Copy after login

At this time, the composer-setup.php file is gone

4. Check whether composer is installed successfully

Enter in the terminal:

composer -v
Copy after login

Okay, let’s start your composer journey

For more composer usage tutorials, please visit the composer command usage graphic tutorial column!

The above is the detailed content of What to do if composer installation error occurs. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template