Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Composer prompts zlib_decode (): what about data error

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the Composer hint zlib_decode (): how to do data error, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Environment description

CentOS Linux 7PHP 5.6.36Composer 1.8.6

Amazon Hong Kong server

Original output

Clear cach

Composer clearcacheCache directory does not exist (cache-vcs-dir): Clearing cache (cache-repo-dir): / home/work/.cache/composer/repoClearing cache (cache-files-dir): / home/work/.cache/composer/filesClearing cache (cache-dir): / home/work/.cache/composerAll caches cleared.

Check

$composer diagnoseChecking composer.json: OKChecking platform settings: OKChecking git settings: OKChecking http connectivity to packagist: OKChecking https connectivity to packagist: OKChecking github.com rate limit: OKChecking disk free space: OKComposer version: 1.8.6PHP version: 5.6.36PHP binary path: / home/work/apps/php/bin/php

View configuration

$composer config-l [repositories.packagist.org.type] composer [repositories.packagist.org.url] https://mirrors.aliyun.com/composer/[process-timeout] 300 [use-include-path] false [preferred-install] auto [notify-on-install] true [github-protocols] [https Ssh] [vendor-dir] vendor (/ home/work/www/wanglong/vendor) [bin-dir] {$vendor-dir} / bin (/ home/work/www/wanglong/vendor/bin) [cache-dir] / home/work/.cache/composer [data-dir] / home/work/.local/share/composer [cache-files-dir] {$cache-dir} / files (/ home/work/.cache/composer/files) [cache-repo-dir] {$cache-dir} / repo (/ home/work/.cache/composer/repo) [cache-vcs-dir] {$cache-dir} / vcs (/ home/work/.cache/composer/vcs) [cache-ttl] 15552000 [cache-files-ttl] 15552000 [cache-files-maxsize] 300MiB (314572800) [bin-compat] auto [discard-changes] false [autoloader-suffix] [sort-packages] false [optimize-autoloader] false [classmap-authoritative] false [apcu-autoloader] false [prepend-autoloader] true [github-domains ] [github.com] [bitbucket-expose-hostname] true [disable-tls] false [secure-http] true [cafile] [capath] [github-expose-hostname] true [gitlab-domains] [gitlab.com] [store-auths] prompt [archive-format] tar [archive-dir]. [htaccess-protect] true [home] / home/work/.config/composer

Installation

Debugging process

Round One

As soon as I saw this problem, I first took a look at the composer version, not the latest version. Upgrade it.

$composer self-update [Symfony\ Component\ Console\ Exception\ CommandNotFoundException] Command "self-update" is not defined.

The command does not exist. After thinking about it, my user seems to have insufficient privileges. Forget it.

Round Two

Google, the solution to the first item in the search results is to change the source, which originally uses the source of Aliyun, so change it.

$composer config repo.packagist composer http://packagist.phpcomposer.com

After changing the mirror image, composer.json looks like this.

{"license": "proprietary", "require": {"php": "> = 5.6", "guzzlehttp/guzzle": "^ 6.3", "aws/aws-sdk-php": "^ 3.52"}, "autoload": {"psr-4": {"Rpc\": "application/library/Rpc/"}} "repositories": {"packagist": {"type": "composer", "url": "http://packagist.phpcomposer.com"}"

Installation

Do not support http only support https, think about it or not change this configuration, I am not the only one using this machine.

Round Three

I thought for a moment, since it is a foreign server, I might as well go to all the image sources directly, using the default, just do it.

Composer config-g-- unset repos.packagistcomposer config-- unset repos.packagistcomposer clearcachecomposer diagnosecomposer install-vvv

Then install, directly install successfully? I haven't realized it yet. Because the log output of composer install-vvv is too long, it is not convenient to take screenshots. Put a screenshot of composer install output.

Thank you for reading this article carefully. I hope the article "Composer Tips zlib_decode (): what to do with data error" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report