Home > Development Tools > composer > Share a problem encountered during the composer update process

Share a problem encountered during the composer update process

藏色散人
Release: 2022-01-04 14:48:39
forward
2469 people have browsed it

This article is written by the tutorial column of composer to share with you a problem encountered during the composer update process. I hope it will be helpful to friends in need!

Composer update process

My local composer has not been updated since May 2018. Now when using composer, it prompts that 2.0 has been released, so update it Give it a try!

According to the existing thinking, composer supports command updates, that is, using

composer self-update
Copy after login

, but it gave me a prompt

`SHA384 is not supported by your openssl extension, could not verify the phar file integrity
`
Copy after login

Looking at the prompt, it is because there is no ability to Verify the legality of the phar. If this fails, go to the official documentation to find a solution.

Download the latest installation package:

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

Check the hash value of the downloaded file:

php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Copy after login

Confirm successful installation:

php composer-setup.php
Copy after login

Remove link:

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

Move to environment:

mv ./composer-setup.php /usr/local/bin/composer
Copy after login

Share a problem encountered during the composer update process

The above is the detailed content of Share a problem encountered during the composer update process. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:aliyun.com
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